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: <20161130113049.GN3045@worktop.programming.kicks-ass.net>
Date:   Wed, 30 Nov 2016 12:30:49 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Petr Mladek <pmladek@...e.com>
Cc:     linyongting@...wei.com, kejinling@...wei.com,
        akpm@...ux-foundation.org, sergey.senozhatsky@...il.com,
        bp@...e.de, tj@...nel.org, treding@...dia.com,
        linux-kernel@...r.kernel.org, leisure.wang@...wei.com
Subject: Re: [PATCH] printk: Fix spinlock deadlock in printk reenty

On Wed, Nov 30, 2016 at 11:56:53AM +0100, Petr Mladek wrote:
> On Wed 2016-11-30 15:15:19, linyongting@...wei.com wrote:
> > In arm, arm64, x86 or other architecture, spinlock variable

x86 no longer uses ticket locks.

> > The solution is that In function zap_locks(), replace
> > raw_spin_lock_init(&logbuf_lock) with raw_spin_unlock(&logbuf_lock),

That's broken too. Imagine the CPU that actually holds the lock then
_also_ doing an unlock. At that point the tail is ahead of the head and
you're also up some creek without no paddle.

Note that I ran into all these scenarios many years ago..

> Another solution would be to make printk() to ignore locks
> when Oops is in progress. It was somewhere suggested by Peter
> Zijlstra. Well, it might cause some problems as well when
> there are more CPUs still running and printing.

Ignoring is the only option. There is no way to fudge the lock state and
live to tell about it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ