[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKSGW1SXcYleSdph@zeus>
Date: Tue, 19 Aug 2025 23:12:43 +0900
From: Ryosuke Yasuoka <ryasuoka@...hat.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: arnd@...db.de, ojeda@...nel.org, alex.gaynor@...il.com,
boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
lossin@...nel.org, a.hindborg@...nel.org, aliceryhl@...gle.com,
tmgross@...ch.edu, dakr@...nel.org, lee@...nel.org,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH rust-next 1/2] rust: miscdevice: add llseek support
On Tue, Aug 19, 2025 at 08:04:32AM +0200, Greg KH wrote:
> On Tue, Aug 19, 2025 at 02:10:27PM +0900, Ryosuke Yasuoka wrote:
> > 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@...hat.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
>
> Yes, that would probably be best, because as-is, this patch can not
> really do anything :(
>
> Also, we really want an in-tree user for the new functionality (not just
> in the sample driver), if at all possible going forward.
Got it. I'll try to include an in-tree user for it next time.
Thank you.
Ryosuke
> thanks,
>
> greg k-h
>
Powered by blists - more mailing lists