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: <Ybj2zms+c6J3J/pf@elver.google.com>
Date:   Tue, 14 Dec 2021 20:55:58 +0100
From:   Marco Elver <elver@...gle.com>
To:     andrey.konovalov@...ux.dev
Cc:     Alexander Potapenko <glider@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        kasan-dev@...glegroups.com, linux-mm@...ck.org,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        linux-arm-kernel@...ts.infradead.org,
        Peter Collingbourne <pcc@...gle.com>,
        Evgenii Stepanov <eugenis@...gle.com>,
        linux-kernel@...r.kernel.org,
        Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH mm v3 29/38] kasan, vmalloc: add vmalloc tagging for
 HW_TAGS

On Mon, Dec 13, 2021 at 10:54PM +0100, andrey.konovalov@...ux.dev wrote:
[...]
>  
> +	/*
> +	 * Skip page_alloc poisoning and zeroing for pages backing VM_ALLOC
> +	 * mappings. Only effective in HW_TAGS mode.
> +	 */
> +	gfp &= __GFP_SKIP_KASAN_UNPOISON & __GFP_SKIP_ZERO;

This will turn gfp == 0 always. Should it have been

	gfp |= __GFP_SKIP_KASAN_UNPOISON | __GFP_SKIP_ZERO

Also, not sure it matters, but on non-KASAN builds, this will now always
generate an extra instruction. You could conditionally define GFP_SKIP*
only in the KASAN modes that need them, otherwise they become 0, so the
compiler optimizes this out. (Although I think it does does complicate
GFP_SHIFT a little?)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ