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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Jan 2019 10:16:38 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Zhenzhong Duan <zhenzhong.duan@...cle.com>
Cc:     Waiman Long <longman@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        SRINIVAS <srinivas.eeda@...cle.com>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: Question about qspinlock nest

On Fri, Jan 11, 2019 at 04:06:52PM +0800, Zhenzhong Duan wrote:
> 
> On 2019/1/10 22:43, Waiman Long wrote:
> > On 01/10/2019 03:02 AM, Zhenzhong Duan wrote:
> > > Hi Maintainer,
> > > 
> > > 
> > > There is a question confused me for days. Appreciate an answer.
> > > 
> > > In below code, the comment says we never have more than 4 nested
> > > contexts.
> > > 
> > > What happen if debug and mce exceptions nest with the four, or we
> > > ensure it never happen?
> > > 
> > > 
> > > /*
> > >   * Per-CPU queue node structures; we can never have more than 4 nested
> > >   * contexts: task, softirq, hardirq, nmi.
> > >   *
> > >   * Exactly fits one 64-byte cacheline on a 64-bit architecture.
> > >   *
> > >   * PV doubles the storage and uses the second cacheline for PV state.
> > >   */
> > > static DEFINE_PER_CPU_ALIGNED(struct qnode, qnodes[MAX_NODES]);
> > > 
> > Yes, both debug and mce exceptions are some kind of NMIs. So
> > theoretically, it is possible to have more than four. Are you aware of
> > any debug and MCE exception handlers that need to take a spinlock for
> > synchronization?
> 
> Not for debug exception, for MCE exception handler I found below two:
> 
> do_machine_check->mce_report_event->schedule_work
> do_machine_check->force_sig->force_sig_info
> 
> schedule_work() and force_sig_info() take spinlocks.

Boris, how can this be?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ