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:   Fri, 9 Oct 2020 11:21:50 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Qian Cai <cai@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
        linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Boqun Feng <boqun.feng@...il.com>
Subject: Re: [tip: locking/core] lockdep: Fix lockdep recursion

On Fri, Oct 09, 2020 at 01:54:34PM -0400, Qian Cai wrote:
> On Fri, 2020-10-09 at 13:36 -0400, Qian Cai wrote:
> > Back to x86, we have:
> > 
> > start_secondary()
> >   smp_callin()
> >     apic_ap_setup()
> >       setup_local_APIC()
> >         printk() in certain conditions.
> > 
> > which is before smp_store_cpu_info().
> > 
> > Can't we add a rcu_cpu_starting() at the very top for each start_secondary(),
> > secondary_start_kernel(), smp_start_secondary() etc, so we don't worry about
> > any printk() later?
> 
> This is rather irony. rcu_cpu_starting() is taking a lock and then reports
> itself.
> 
> [    8.826732][    T0]  __lock_acquire.cold.76+0x2ad/0x3e0
> [    8.826732][    T0]  lock_acquire+0x1c8/0x820
> [    8.826732][    T0]  _raw_spin_lock_irqsave+0x30/0x50
> [    8.826732][    T0]  rcu_cpu_starting+0xd0/0x2c0
> [    8.826732][    T0]  start_secondary+0x10/0x2a0
> [    8.826732][    T0]  secondary_startup_64_no_verify+0xb8/0xbb

Fun!!!

There should be some way around this.  I cannot safely record the
offline-to-online transition without acquiring a lock.  I suppose
I could trick lockdep into thinking that it was a recursive lockdep
report.  Any other approaches?

						Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ