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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3cb6afa964a629c6457e44dd3222ee7ebaace8f0.camel@sipsolutions.net>
Date: Wed, 09 Oct 2024 19:36:11 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org, "Rafael J.
 Wysocki" <rafael@...nel.org>, Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC PATCH 1/2] debugfs: add small file operations for most
 files

On Wed, 2024-10-09 at 19:33 +0200, Greg Kroah-Hartman wrote:
> On Wed, Oct 09, 2024 at 06:13:39PM +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@...el.com>
> > 
> > As struct file_operations is really big, but (most) debugfs
> > files only use simple_open, read and write, and don't need
> > anything else, this wastes a lot of space for NULL pointers.
> 
> You added llseek too, I'm guessing you need/want that?

Oh, right. I had it without llseek originally, but then I thought we
might be worried about breaking the API on debugfs files, even if most
of the time really it's not used. But if people were worried that'd
severely limit where this could be used, vs. another pointer.

Just forgot to add it above when I edited the commit message.

> > Add a struct debugfs_short_fops and some bookkeeping code in
> > debugfs so that users can use that with debugfs_create_file()
> > using _Generic to figure out which function to use.
> 
> That's crazy, but nice work!

Yeah it's a bit crazy, I agree. With _Generic() it's actually nice to
use though, and the conversions are mostly trivial as you can see in the
other patch. So glad we moved to C11 :-)

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ