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:   Thu, 12 Oct 2023 13:14:39 +0200
From:   Alexander Potapenko <glider@...gle.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, Andrew Donnellan <ajd@...ux.ibm.com>,
        Xiaoke Wang <xkernel.wang@...mail.com>, stable@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH] lib/test_meminit: fix off-by-one error in test_pages()

On Thu, Oct 12, 2023 at 12:37 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Thu, Oct 12, 2023 at 12:26:58PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Oct 12, 2023 at 10:40:14AM +0200, Alexander Potapenko wrote:
> > > On Thu, Oct 12, 2023 at 10:17 AM Greg Kroah-Hartman
> > > <gregkh@...uxfoundation.org> wrote:
> > > >
> > > > In commit efb78fa86e95 ("lib/test_meminit: allocate pages up to order
> > > > MAX_ORDER"), the loop for testing pages is set to "<= MAX_ORDER" which
> > > > causes crashes in systems when run.  Fix this to "< MAX_ORDER" to fix
> > > > the test to work properly.
> > >
> > > What are the crashes you are seeing? Are those OOMs?
> >
> > They are WARN_ON() triggers.  They are burried in the Android build
> > system, let me see if I can uncover them.
> >
> > > IIUC it should be valid to allocate with MAX_ORDER.
> >
> > "should", but I no longer get runtime warnings with this patch applied,
> > so something is wrong :)

I think I know what's going on. In March 2023 Kirill changed the
semantics of MAX_ORDER to be inclusive: now alloc_pages() accepts
0..MAX_ORDER, whereas previously it was 0..MAX_ORDER-1:
https://github.com/torvalds/linux/commit/23baf831a32c04f9a968812511540b1b3e648bf5
Older kernel versions had an explicit check for order >= MAX_ORDER,
which is what you're seeing on Android.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ