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-next>] [day] [month] [year] [list]
Message-Id: <1509007060-24191-1-git-send-email-julien.thierry@arm.com>
Date:   Thu, 26 Oct 2017 09:37:40 +0100
From:   Julien Thierry <julien.thierry@....com>
To:     linux-kernel@...r.kernel.org
Cc:     Julien Thierry <julien.thierry@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Subject: [PATCH] trace: fix undefined tracing functions build error

When selecting CONFIG_PREEMPTIRQ_EVENTS without CONFIG_DEBUG_PREEMPT,
trace_preempt_(en|dis)able_* names do not get defined. This causes a build
error in function trace_preempt_off (kernel/trace/trace_irqsoff.c) when
CONFIG_PREEMPT_TRACER is enabled.

Similarly, when selecting CONFIG_PREEMPTIRQ_EVENTS and
CONFIG_PROVE_LOCKING, trace_irq_(en|dis)able_* names do not get defined,
although it seems they do not get referenced in that configuration.

Ensure trace_(irq|preempt)_* names are always defined, becoming empty
macros in the cases where they were not defined previously.

Signed-off-by: Julien Thierry <julien.thierry@....com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>
---
 include/trace/events/preemptirq.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/preemptirq.h b/include/trace/events/preemptirq.h
index f5024c5..9c4eb33 100644
--- a/include/trace/events/preemptirq.h
+++ b/include/trace/events/preemptirq.h
@@ -56,15 +56,18 @@

 #include <trace/define_trace.h>

-#else /* !CONFIG_PREEMPTIRQ_EVENTS */
+#endif /* !CONFIG_PREEMPTIRQ_EVENTS */

+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING)
 #define trace_irq_enable(...)
 #define trace_irq_disable(...)
-#define trace_preempt_enable(...)
-#define trace_preempt_disable(...)
 #define trace_irq_enable_rcuidle(...)
 #define trace_irq_disable_rcuidle(...)
+#endif
+
+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT)
+#define trace_preempt_enable(...)
+#define trace_preempt_disable(...)
 #define trace_preempt_enable_rcuidle(...)
 #define trace_preempt_disable_rcuidle(...)
-
 #endif
--
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ