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]
Date:   Tue, 25 Jun 2019 08:13:57 -0700
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     Christoph Hellwig <hch@....de>
Cc:     Damien Le Moal <Damien.LeMoal@....com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/12] xfs: initialize ioma->flags in xfs_bmbt_to_iomap

On Tue, Jun 25, 2019 at 12:07:01PM +0200, Christoph Hellwig wrote:
> On Mon, Jun 24, 2019 at 07:57:07AM -0700, Darrick J. Wong wrote:
> > On Mon, Jun 24, 2019 at 07:52:45AM +0200, Christoph Hellwig wrote:
> > > Currently we don't overwrite the flags field in the iomap in
> > > xfs_bmbt_to_iomap.  This works fine with 0-initialized iomaps on stack,
> > > but is harmful once we want to be able to reuse an iomap in the
> > > writeback code.
> > 
> > Is that going to affect all the other iomap users, or is xfs the only
> > one that assumes zero-initialized iomaps being passed into
> > ->iomap_begin?
> 
> This doesn't affect any existing user as they all get a zeroed iomap
> passed from the caller in iomap.c.  It affects the writeback code
> once it uses struct iomap as it overwrites a previously used iomap.

Then shouldn't this new writeback code zero the iomap before calling
back into the filesystem, just to maintain consistent behavior?

--D

Powered by blists - more mailing lists