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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081106075754.GE8459@elte.hu>
Date:	Thu, 6 Nov 2008 08:57:54 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Zdenek Kabelac <zdenek.kabelac@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: sys_sched_yield keeps locked irq before call of schedule()


* Zdenek Kabelac <zdenek.kabelac@...il.com> wrote:

> > is this some special warning you added? The stock kernel certainly 
> > does not emit this warning.
> 
> Yes - it's my personal debug checker that tries to watch wether irq 
> & irqsafe are running in pair. So it shows a warning if there is a 
> call of spin_lock_irq and irq is already dissabled.

btw., i have added lockdep instrumentation for this two years ago, 
it's in the upstream kernel:

/proc/lockdep_stats: redundant hardirq ons:                7744
/proc/lockdep_stats: redundant hardirq offs:            1873736
/proc/lockdep_stats: redundant softirq ons:                   0
/proc/lockdep_stats: redundant softirq offs:                  0

you could extend the code to trace it. See 
kernel/lockdep.c:trace_hardirqs_on_caller(). This bit does it:

        if (unlikely(curr->hardirqs_enabled)) {
                debug_atomic_inc(&redundant_hardirqs_on);
                return;
        }

you could add a ftrace_printk("redundant hardirq") call right there, 
enable ftrace, and enable stack tracing of each trace entry:

 echo stacktrace > /debug/tracing/iter_ctrl

then you should see all the call sites in /debug/tracing/trace.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ