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-next>] [day] [month] [year] [list]
Message-Id: <20250120-trace_events-fix-wundef-v1-1-61259cbbaa75@kernel.org>
Date: Mon, 20 Jan 2025 05:29:24 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>, 
 Masami Hiramatsu <mhiramat@...nel.org>, 
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
 llvm@...ts.linux.dev, patches@...ts.linux.dev, 
 kernel test robot <lkp@...el.com>, Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH] tracing: Fix -Wundef around 'struct event_mod_load'

When CONFIG_MODULES is disabled, clang warns:

  kernel/trace/trace_events.c:872:5: warning: 'CONFIG_MODULES' is not defined, evaluates to 0 [-Wundef]
    872 | #if CONFIG_MODULES
        |     ^

Use '#ifdef' to resolve the warning.

Fixes: b355247df104 ("tracing: Cache ":mod:" events for modules not loaded yet")
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501190121.E2CIJuUj-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@...nel.org>
---
 kernel/trace/trace_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index ab04994e4510..de934332ba36 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -869,7 +869,7 @@ static int ftrace_event_enable_disable(struct trace_event_file *file,
 	return __ftrace_event_enable_disable(file, enable, 0);
 }
 
-#if CONFIG_MODULES
+#ifdef CONFIG_MODULES
 struct event_mod_load {
 	struct list_head	list;
 	char			*module;

---
base-commit: 9f3ccaeedbe0088f1b89474bcf4187c49cfe8de2
change-id: 20250120-trace_events-fix-wundef-7a1153105f5f

Best regards,
-- 
Nathan Chancellor <nathan@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ