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]
Message-ID: <10f6eff4-ab0b-7ad1-1d05-5dcc71bbd0fc@suse.cz>
Date:   Mon, 6 Jan 2020 09:37:03 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, Joonsoo Kim <iamjoonsoo.kim@....com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Michal Hocko <mhocko@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH] mm, debug_pagealloc: don't rely on static keys too early

On 1/3/20 4:02 AM, Andrew Morton wrote:
> On Thu, 19 Dec 2019 14:06:12 +0100 Vlastimil Babka <vbabka@...e.cz> wrote:
> 
>> Commit 96a2b03f281d ("mm, debug_pagelloc: use static keys to enable debugging")
>> has introduced a static key to reduce overhead when debug_pagealloc is compiled
>> in but not enabled. It relied on the assumption that jump_label_init() is
>> called before parse_early_param() as in start_kernel(), so when the
>> "debug_pagealloc=on" option is parsed, it is safe to enable the static key.
>>
>> However, it turns out multiple architectures call parse_early_param() earlier
>> from their setup_arch(). x86 also calls jump_label_init() even earlier, so no
>> issue was found while testing the commit, but same is not true for e.g. ppc64
>> and s390 where the kernel would not boot with debug_pagealloc=on as found by
>> our QA.
>>
>> To fix this without tricky changes to init code of multiple architectures, this
>> patch partially reverts the static key conversion from 96a2b03f281d. Init-time
>> and non-fastpath calls (such as in arch code) of debug_pagealloc_enabled() will
>> again test a simple bool variable. Fastpath mm code is converted to a new
>> debug_pagealloc_enabled_static() variant that relies on the static key, which
>> is enabled in a well-defined point in mm_init() where it's guaranteed that
>> jump_label_init() has been called, regardless of architecture.
> 
> I'm seeing this with x86_64 allmodconfig:
> 
> ERROR: "_debug_pagealloc_enabled_early" [sound/drivers/pcsp/snd-pcsp.ko] undefined!
> 
> Not sure why.  It's there:
> 
> q:/usr/src/25> nm mm/page_alloc.o|grep _debug_pagealloc_enabled
> ...
> 00000000000028a0 B _debug_pagealloc_enabled
> ...
> 
> and exported:
> 
> 0000000000000072 r __kstrtab__debug_pagealloc_enabled

Hm that's not the _early version. Missing export indeed, can you amend
with Stephen's patch? Thanks!

https://lore.kernel.org/linux-next/20200106164944.063ac07b@canb.auug.org.au/

> 
> Odd.  Does this happen to you as well?
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ