]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
module: add helper function for reading module_buildid()
authorPetr Mladek <pmladek@suse.com>
Fri, 28 Nov 2025 13:59:16 +0000 (14:59 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:44:22 +0000 (19:44 -0800)
commitacfdbb4ab2910ff6f03becb569c23ac7b2223913
tree1127e2603b827f9c4284a6e27d6548ba19f8a3f1
parentfda024fb64769e9d6b3916d013c78d6b189129f8
module: add helper function for reading module_buildid()

Add a helper function for reading the optional "build_id" member of struct
module.  It is going to be used also in ftrace_mod_address_lookup().

Use "#ifdef" instead of "#if IS_ENABLED()" to match the declaration of the
optional field in struct module.

Link: https://lkml.kernel.org/r/20251128135920.217303-4-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Cc: Aaron Tomlin <atomlin@atomlin.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkman <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Luis Chamberalin <mcgrof@kernel.org>
Cc: Marc Rutland <mark.rutland@arm.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/module.h
kernel/module/kallsyms.c