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: <20230721062423.GA20845@lst.de>
Date:   Fri, 21 Jul 2023 08:24:23 +0200
From:   Christoph Hellwig <hch@....de>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
        "Darrick J. Wong" <djwong@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christian Brauner <christian@...uner.io>,
        linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-xfs@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] fs: add CONFIG_BUFFER_HEAD

On Thu, Jul 20, 2023 at 03:45:11PM +0100, Matthew Wilcox wrote:
> On Thu, Jul 20, 2023 at 04:04:52PM +0200, Christoph Hellwig wrote:
> > @@ -400,7 +391,8 @@ static int blkdev_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
> >  	iomap->type = IOMAP_MAPPED;
> >  	iomap->addr = iomap->offset;
> >  	iomap->length = isize - iomap->offset;
> > -	iomap->flags |= IOMAP_F_BUFFER_HEAD;
> > +	if (IS_ENABLED(CONFIG_BUFFER_HEAD))
> > +		iomap->flags |= IOMAP_F_BUFFER_HEAD;
> 
> Wouldn't it be simpler to do ...
> 
> +#ifdef CONFIG_BUFFER_HEAD
>  #define IOMAP_F_BUFFER_HEAD     (1U << 4)
> +#else
> +#define IOMAP_F_BUFFER_HEAD	0
> +#endif
> 
> in include/linux/iomap.h ?

> ... because this function then goes away.

I guess we could do that.  It is less intrusive, but I have to say I find
flags that get defined away to 0 fairly confusing for the reader.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ