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:   Mon, 30 Apr 2018 17:01:04 +0000
From:   Joel Fernandes <joelaf@...gle.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Tom Zanussi <tom.zanussi@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Boqun Feng <boqun.feng@...il.com>,
        Paul McKenney <paulmck@...ux.vnet.ibm.com>,
        "Cc: Frederic Weisbecker" <fweisbec@...il.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Fenguang Wu <fengguang.wu@...el.com>,
        Baohong Liu <baohong.liu@...el.com>,
        Vedang Patel <vedang.patel@...el.com>,
        "Cc: Android Kernel" <kernel-team@...roid.com>
Subject: Re: [PATCH] softirq: reorder trace_softirqs_on to prevent lockdep splat

On Mon, Apr 30, 2018 at 9:52 AM Joel Fernandes <joelaf@...gle.com> wrote:


> On Mon, Apr 30, 2018 at 9:38 AM Steven Rostedt <rostedt@...dmis.org>
wrote:

> > On Thu, 26 Apr 2018 21:11:00 -0700
> > Joel Fernandes <joelaf@...gle.com> wrote:

> > > I'm able to reproduce a lockdep splat when CONFIG_PROVE_LOCKING=y and
> > > CONFIG_PREEMPTIRQ_EVENTS=y.
> > >
> > > $ echo 1 > /d/tracing/events/preemptirq/preempt_enable/enable
> > > ---
> > > [   26.112609] DEBUG_LOCKS_WARN_ON(current->softirqs_enabled)
> > > [   26.112636] WARNING: CPU: 0 PID: 118 at
kernel/locking/lockdep.c:3854
> > > [...]
> > > [   26.144229] Call Trace:
> > > [   26.144926]  <IRQ>
> > > [   26.145506]  lock_acquire+0x55/0x1b0
> > > [   26.146499]  ? __do_softirq+0x46f/0x4d9
> > > [   26.147571]  ? __do_softirq+0x46f/0x4d9
> > > [   26.148646]  trace_preempt_on+0x8f/0x240
> > > [   26.149744]  ? trace_preempt_on+0x4d/0x240
> > > [   26.150862]  ? __do_softirq+0x46f/0x4d9
> > > [   26.151930]  preempt_count_sub+0x18a/0x1a0
> > > [   26.152985]  __do_softirq+0x46f/0x4d9
> > > [   26.153937]  irq_exit+0x68/0xe0
> > > [   26.154755]  smp_apic_timer_interrupt+0x271/0x280
> > > [   26.156056]  apic_timer_interrupt+0xf/0x20
> > > [   26.157105]  </IRQ>

> > I'm not able to trigger this. Is there more to it?

> No that should be it. I have a 100% repro on v4.16. I will try on a newer
> kernel and let you know.

Tried 4.17-rc3 and see it too. Could be difference in configs? Also, the
environment is a Qemu system with single CPU 1GB memory. Attached is the
config.

I think when I had multiple CPUs it was harder to trigger it, but can't
really remember now. There was a time when triggering it was quite
intermittent.

thanks,

- Joel

Download attachment "config" of type "application/octet-stream" (114667 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ