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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSl+Ezh3Av3LLyEf@casper.infradead.org>
Date:   Fri, 13 Oct 2023 18:27:47 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     David Howells <dhowells@...hat.com>
Cc:     Jeff Layton <jlayton@...nel.org>,
        Steve French <smfrench@...il.com>,
        Marc Dionne <marc.dionne@...istor.com>,
        Paulo Alcantara <pc@...guebit.com>,
        Shyam Prasad N <sprasad@...rosoft.com>,
        Tom Talpey <tom@...pey.com>,
        Dominique Martinet <asmadeus@...ewreck.org>,
        Ilya Dryomov <idryomov@...il.com>,
        Christian Brauner <christian@...uner.io>,
        linux-afs@...ts.infradead.org, linux-cifs@...r.kernel.org,
        linux-nfs@...r.kernel.org, ceph-devel@...r.kernel.org,
        v9fs@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
        linux-mm@...ck.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-cachefs@...hat.com
Subject: Re: [RFC PATCH 12/53] netfs: Provide tools to create a buffer in an
 xarray

On Fri, Oct 13, 2023 at 05:03:41PM +0100, David Howells wrote:
> +int netfs_xa_store_and_mark(struct xarray *xa, unsigned long index,
> +			    struct folio *folio, bool put_mark,
> +			    bool pagecache_mark, gfp_t gfp_mask);

Linus has been unhappy recently with functions that take two bools.
When you're reading the caller, you see:

	netfs_xa_store_and_mark(xa, index, true, false, GFP_FOO);

and you don't know instantly what true and false mean.  He prefers

#define NETFS_FLAG_PUT		(1 << 0)
#define NETFS_FLAG_PAGECACHE	(1 << 1)

and then the caller looks like:

	netfs_xa_store_and_mark(xa, index, NETFS_FLAG_PUT, GFP_FOO);

and you know exactly what it's doing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ