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]
Date:   Wed, 11 Oct 2017 08:40:13 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Thumshirn <jthumshirn@...e.de>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        Toshi Kani <toshi.kani@....com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix mpage_writepage() for pages with buffers

On Tue, Oct 10, 2017 at 01:31:44PM -0700, Linus Torvalds wrote:
> On Tue, Oct 10, 2017 at 12:44 PM, Andrew Morton
> <akpm@...ux-foundation.org> wrote:
> >
> > This is all pretty mature code (isn't it?).  Any idea why this bug
> > popped up now?

I have no idea why it's suddenly popped up.  It looks like it should
be a bohrbug, but it's actually a heisenbug, and I don't understand
that either.

> Also, while the patch looks sane, the
> 
>         clean_buffers(page, PAGE_SIZE);
> 
> line really threw me. That's an insane value to pick, it looks like
> "bytes in page", but it isn't. It's just a random value that is bigger
> than "PAGE_SIZE >> SECTOR_SHIFT".
> 
> I'd prefer to see just ~0u if the intention is just "bigger than
> anything possible".

Actually, I did choose it to be "number of bytes in the page", based on
the reasoning that I didn't want to calculate what the actual block size
was, and the block size surely couldn't be any smaller than one byte.  I
forgot about the SECTOR_SIZE limit on filesystem block size, so your
spelling of "big enough" does look better.

Now that I think about it some more, I suppose we might end up with a
situation where we're eventually passing a hugepage to this routine,
and futureproofing it with ~0U probably makes more sense.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ