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]
Date:   Thu, 2 Jul 2020 09:30:31 +0200
From:   Christoph Hellwig <hch@....de>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Christoph Hellwig <hch@....de>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 17/23] proc: add a read_iter method to proc proc_ops

On Thu, Jul 02, 2020 at 07:18:11AM +0200, Christoph Hellwig wrote:
> On Wed, Jul 01, 2020 at 10:27:51PM +0100, Al Viro wrote:
> > On Wed, Jul 01, 2020 at 10:09:45PM +0200, Christoph Hellwig wrote:
> > > This will allow proc files to implement iter read semantics.
> > 
> > *UGH*
> > 
> > You are introducing file_operations with both ->read() and ->read_iter();
> > worse, in some cases they are not equivalent.  Sure, ->read() takes
> > precedence right now, but...  why not a separate file_operations for
> > ->read_iter-capable files?
> 
> I looked at that initially.  We'd need to more instances as there
> already are two due to compat stuff.  If that is preferably I can
> switch to that version.
> 
> > I really hate the fallbacks of that sort - they tend to be brittle
> > as hell.  And while we are at it, I'm not sure that your iter_read() 
> > has good cause to be non-static.
> 
> The other user of it is seq_file, which as-is should go away, but
> will probably keep the occasional version of it in the caller.  I just
> got really tired of reimplementing it a few times.

I've force puhed a new version to the existing location:

   git://git.infradead.org/users/hch/misc.git set_fs-rw

That gets uses separate ops in proc after a few preparational cleanups
and rid of the iter_read() patch entirely.  Let me know what you think,
I don't really want to send the whole patch bomb again already.

Gitweb is also avaiable here:

   http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/set_fs-rw

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ