lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025081935-railcar-playing-eb9d@gregkh>
Date: Tue, 19 Aug 2025 08:04:32 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Ryosuke Yasuoka <ryasuoka@...hat.com>
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 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.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ