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, 20 Dec 2018 18:45:48 +0000
From:   Vineet Gupta <vineet.gupta1@...opsys.com>
To:     Michal Hocko <mhocko@...nel.org>
CC:     "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] ARC: show_regs: fix lockdep splat for good

On 12/20/18 5:04 AM, Michal Hocko wrote:
> On Tue 18-12-18 10:53:59, Vineet Gupta wrote:
>> signal handling core calls ARCH show_regs() with preemption disabled
>> which causes __might_sleep functions such as mmput leading to lockdep
>> splat.  Workaround by re-enabling preemption temporarily.
>>
>> This may not be as bad as it sounds since the preemption disabling
>> itself was introduced for a supressing smp_processor_id() warning in x86
>> code by commit 3a9f84d354ce ("signals, debug: fix BUG: using
>> smp_processor_id() in preemptible code in print_fatal_signal()")
> The commit you are referring to here sounds dubious in itself.

Indeed that was my thought as well, but it did introduce the preemption disabling
logic aroung core calling show_regs() !

> We do not
> want to stick a preempt_disable just to silence a warning.

I presume you are referring to original commit, not my anti-change in ARC code,
which is actually re-enabling it.

> show_regs is
> called from preemptible context at several places (e.g. __warn).

Right, but do we have other reports which show this, perhaps not too many distros
have CONFIG__PREEMPT enabled ?

> Maybe
> this was not the case in 2009 when the change was introduced but this
> seems like a relict from the past. So can we fix the actual problem
> rather than build on top of it instead?

The best/correct fix is to remove the preempt diabling in core code, but that
affects every arch out there and will likely trip dormant land mines, needed
localized fixes like I'm dealing with now.

-Vineet

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ