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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 28 Mar 2022 19:03:20 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     andrey.konovalov@...ux.dev
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Marco Elver <elver@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        kasan-dev@...glegroups.com, linux-mm@...ck.org,
        Vlastimil Babka <vbabka@...e.cz>,
        Matthew Wilcox <willy@...radead.org>,
        linux-kernel@...r.kernel.org,
        Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH] mm, kasan: fix __GFP_BITS_SHIFT definition breaking
 LOCKDEP

On 2022-03-27 19:00:23 [+0200], andrey.konovalov@...ux.dev wrote:
> From: Andrey Konovalov <andreyknvl@...gle.com>
> 
> KASAN changes that added new GFP flags mistakenly updated __GFP_BITS_SHIFT
> as the total number of GFP bits instead of as a shift used to define
> __GFP_BITS_MASK.
> 
> This broke LOCKDEP, as __GFP_BITS_MASK now gets the 25th bit enabled
> instead of the 28th for __GFP_NOLOCKDEP.
> 
> Update __GFP_BITS_SHIFT to always count KASAN GFP bits.
> 
> In the future, we could handle all combinations of KASAN and LOCKDEP to
> occupy as few bits as possible. For now, we have enough GFP bits to be
> inefficient in this quick fix.
> 
> Fixes: 9353ffa6e9e9 ("kasan, page_alloc: allow skipping memory init for HW_TAGS")
> Fixes: 53ae233c30a6 ("kasan, page_alloc: allow skipping unpoisoning for HW_TAGS")
> Fixes: f49d9c5bb15c ("kasan, mm: only define ___GFP_SKIP_KASAN_POISON with HW_TAGS")
> Reported-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>

Tested-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ