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: <703d85ab-899c-8192-2618-995efc292fdb@suse.cz>
Date:   Thu, 19 Dec 2019 14:34:29 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Qian Cai <cai@....pw>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, 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>
Subject: Re: [PATCH] mm, debug_pagealloc: don't rely on static keys too early

On 12/19/19 2:16 PM, Qian Cai wrote:
> 
> 
>> On Dec 19, 2019, at 8:06 AM, 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.
> 
> This was daily tested on linux-next here for those arches and never saw an issue.

Well I assume nobody has booted the kernel specifically with
debug_pagealloc=on. In case a randconfig run enabled
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT then the problem wouldn't manifest
as the static key would be initialized with DEFINE_STATIC_KEY_TRUE by
the compiler itself, and the enabling-by-param would be a no-op.

> Are you able to reproduce it on mainline or linux-next?

I didn't try, but our kernel is 5.3-based so that's quite recent. The
offending commit was also introduced in 5.3-rc1 so there's that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ