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: <20100908122557.GA5310@nowhere>
Date:	Wed, 8 Sep 2010 14:26:00 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	mingo@...hat.com, mathieu.desnoyers@...icios.com,
	sanagi.koki@...fujitsu.com, rostedt@...dmis.org,
	nhorman@...driver.com, scott.a.mcmillan@...el.com,
	tglx@...utronix.de, laijs@...fujitsu.com, hpa@...or.com,
	linux-kernel@...r.kernel.org, eric.dumazet@...il.com,
	kaneshige.kenji@...fujitsu.com, davem@...emloft.net,
	izumi.taku@...fujitsu.com, kosaki.motohiro@...fujitsu.com,
	linux-tip-commits@...r.kernel.org
Subject: [PATCH] irq: Fix circular headers dependency

On Wed, Sep 08, 2010 at 01:25:29PM +0200, Ingo Molnar wrote:
> 
> * tip-bot for Lai Jiangshan <laijs@...fujitsu.com> wrote:
> 
> > Commit-ID:  2bf2160d8805de64308e2e7c3cd97813cb58ed2f
> > Gitweb:     http://git.kernel.org/tip/2bf2160d8805de64308e2e7c3cd97813cb58ed2f
> > Author:     Lai Jiangshan <laijs@...fujitsu.com>
> > AuthorDate: Mon, 23 Aug 2010 18:42:48 +0900
> > Committer:  Frederic Weisbecker <fweisbec@...il.com>
> > CommitDate: Tue, 7 Sep 2010 17:49:34 +0200
> > 
> > irq: Add tracepoint to softirq_raise
> > 
> > Add a tracepoint for tracing when softirq action is raised.
> > 
> > This and the existing tracepoints complete softirq's tracepoints:
> > softirq_raise, softirq_entry and softirq_exit.
> > 
> > And when this tracepoint is used in combination with
> > the softirq_entry tracepoint we can determine
> > the softirq raise latency.
> > 
> > Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> > Acked-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> > Acked-by: Neil Horman <nhorman@...driver.com>
> > Cc: David Miller <davem@...emloft.net>
> > Cc: Kaneshige Kenji <kaneshige.kenji@...fujitsu.com>
> > Cc: Izumo Taku <izumi.taku@...fujitsu.com>
> > Cc: Kosaki Motohiro <kosaki.motohiro@...fujitsu.com>
> > Cc: Lai Jiangshan <laijs@...fujitsu.com>
> > Cc: Scott Mcmillan <scott.a.mcmillan@...el.com>
> > Cc: Steven Rostedt <rostedt@...dmis.org>
> > Cc: Eric Dumazet <eric.dumazet@...il.com>
> > LKML-Reference: <4C724298.4050509@...fujitsu.com>
> > [ factorize softirq events with DECLARE_EVENT_CLASS ]
> > Signed-off-by: Koki Sanagi <sanagi.koki@...fujitsu.com>
> > Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> > ---
> >  include/linux/interrupt.h  |    8 +++++++-
> >  include/trace/events/irq.h |   26 ++++++++++++++++++++++++--
> >  2 files changed, 31 insertions(+), 3 deletions(-)
> 
> FYI, this commit broke the Sparc build:
> 
> In file included from /home/mingo/tip/arch/sparc/include/asm/irq_32.h:11,
>                  from /home/mingo/tip/arch/sparc/include/asm/irq.h:6,
>                  from /home/mingo/tip/include/linux/irqnr.h:10,
>                  from /home/mingo/tip/include/linux/irq.h:22,
>                  from /home/mingo/tip/include/asm-generic/hardirq.h:6,
>                  from /home/mingo/tip/arch/sparc/include/asm/hardirq_32.h:11,
>                  from /home/mingo/tip/arch/sparc/include/asm/hardirq.h:6,
>                  from /home/mingo/tip/include/linux/hardirq.h:10,
>                  from /home/mingo/tip/include/linux/ftrace_event.h:7,
>                  from /home/mingo/tip/include/trace/syscall.h:6,
>                  from /home/mingo/tip/include/linux/syscalls.h:76,
>                  from /home/mingo/tip/init/initramfs.c:9:
> /home/mingo/tip/include/linux/interrupt.h: In function '__raise_softirq_irqoff':
> /home/mingo/tip/include/linux/interrupt.h:414: error: implicit declaration of function 'local_softirq_pending'
> /home/mingo/tip/include/linux/interrupt.h:414: error: lvalue required as left operand of assignment
> make[2]: *** [init/initramfs.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> In file included from /home/mingo/tip/arch/sparc/include/asm/irq_32.h:11,
> 
> 	Ingo


Yeah, there is a circular dependency.
Does that fixes the issue (and if so, does that look sane)?

Thanks.

---
>From fc21eaa02d4a6f0af396af6a106587e61515cd86 Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@...il.com>
Date: Wed, 8 Sep 2010 14:17:31 +0200
Subject: [PATCH] irq: Fix circular headers dependency

asm-generic/hardirq.h needs asm/irq.h which might include
linux/interrupt.h as in the sparc 32 case. At this point
we need irq_cpustat generic definitions, but those are
included later in asm-generic/hardirq.h.

Then delay a bit the inclusion of irq.h from
asm-generic/hardirq.h, it doesn't need to be included early.

This fixes:

In file included from arch/sparc/include/asm/irq_32.h:11,
                  from arch/sparc/include/asm/irq.h:6,
                  from include/linux/irqnr.h:10,
                  from include/linux/irq.h:22,
                  from include/asm-generic/hardirq.h:6,
                  from arch/sparc/include/asm/hardirq_32.h:11,
                  from arch/sparc/include/asm/hardirq.h:6,
                  from include/linux/hardirq.h:10,
                  from include/linux/ftrace_event.h:7,
                  from include/trace/syscall.h:6,
                  from include/linux/syscalls.h:76,
                  from init/initramfs.c:9:
include/linux/interrupt.h: In function '__raise_softirq_irqoff':
include/linux/interrupt.h:414: error: implicit declaration of function 'local_softirq_pending'
include/linux/interrupt.h:414: error: lvalue required as left operand of assignment

Reported-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Koki Sanagi <sanagi.koki@...fujitsu.com>
---
 include/asm-generic/hardirq.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/hardirq.h b/include/asm-generic/hardirq.h
index 62f5908..04d0a97 100644
--- a/include/asm-generic/hardirq.h
+++ b/include/asm-generic/hardirq.h
@@ -3,13 +3,13 @@
 
 #include <linux/cache.h>
 #include <linux/threads.h>
-#include <linux/irq.h>
 
 typedef struct {
 	unsigned int __softirq_pending;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
+#include <linux/irq.h>
 
 #ifndef ack_bad_irq
 static inline void ack_bad_irq(unsigned int irq)
-- 
1.6.2.3


--
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