rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryosuke Yasuoka <ryasuoka@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: arnd@arndb.de, ojeda@kernel.org, alex.gaynor@gmail.com,
	boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com,
	lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
	tmgross@umich.edu, dakr@kernel.org, lee@kernel.org,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH rust-next 1/2] rust: miscdevice: add llseek support
Date: Tue, 19 Aug 2025 14:10:27 +0900	[thread overview]
Message-ID: <aKQHQ4av5ZqfQ8Q1@zeus> (raw)
In-Reply-To: <2025081836-unbraided-justness-4b43@gregkh>

On Mon, Aug 18, 2025 at 04:17:40PM +0200, Greg KH wrote:
> On Mon, Aug 18, 2025 at 10:58:38PM +0900, Ryosuke Yasuoka wrote:
> > Add the ability to write a file_operations->llseek hook in Rust when
> > using the miscdevice abstraction.
> > 
> > Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
> > ---
> >  rust/kernel/miscdevice.rs | 36 ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> 
> What misc device driver needs any real llseek function?  The ones I see
> in the tree are only using generic_llseek or noop_llseek.
> 
> Do you have a specific misc driver that you want to write in rust that
> needs this call?

No, I'm not actually writing a practical misc driver. I'm just creating
a toy misc driver to use for testing.

In my toy driver, I need read, write, lseek, and ioctl to verify the
basic functionality of the device driver. I saw the Jones and Alice were
already working on read/write functions [1] and I believe they will
propose their patch soon. So I propose implementing lseek which
anyone does not work on currently. This is the background of my patch.

As you mentioned, lseek by itself probably doesn't have much meaning.
Should I wait for their read/write implementation to be finalized before
proceeding this?

[1] https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/.E2.9C.94.20Miscdevice.20read.2Fwrite.20abstraction.3F/with/497953296

Thank you very much for your comment.
Ryosuke

> 
> thanks,
> 
> greg k-h
> 


  reply	other threads:[~2025-08-19  5:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 13:58 [PATCH rust-next 0/2] Add llseek support to miscdevice and samples Ryosuke Yasuoka
2025-08-18 13:58 ` [PATCH rust-next 1/2] rust: miscdevice: add llseek support Ryosuke Yasuoka
2025-08-18 14:17   ` Greg KH
2025-08-19  5:10     ` Ryosuke Yasuoka [this message]
2025-08-19  6:04       ` Greg KH
2025-08-19 14:12         ` Ryosuke Yasuoka
2025-08-21 14:48           ` Miguel Ojeda
2025-08-18 13:58 ` [PATCH rust-next 2/2] rust: samples: miscdevice: add lseek samples Ryosuke Yasuoka
2025-08-18 22:05   ` Benno Lossin
2025-08-19  5:18     ` Ryosuke Yasuoka
2025-08-18 14:18 ` [PATCH rust-next 0/2] Add llseek support to miscdevice and samples Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aKQHQ4av5ZqfQ8Q1@zeus \
    --to=ryasuoka@redhat.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).