diff options
author | Kris Van Hees <kris.van.hees@oracle.com> | 2024-09-06 10:45:04 -0400 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-09-20 09:21:52 +0900 |
commit | ac7bd0945e3db5253bd03bfc40e71afafb08d225 (patch) | |
tree | e8b20f51958ed9e45086e28a65e0c3959bdba8bd /scripts/Makefile.ubsan | |
parent | 5f5e7344322f0b0676579af054c787ed57d1c1df (diff) |
scripts: add verifier script for builtin module range data
The modules.builtin.ranges offset range data for builtin modules is
generated at compile time based on the list of built-in modules and
the vmlinux.map and vmlinux.o.map linker maps. This data can be used
to determine whether a symbol at a particular address belongs to
module code that was configured to be compiled into the kernel proper
as a built-in module (rather than as a standalone module).
This patch adds a script that uses the generated modules.builtin.ranges
data to annotate the symbols in the System.map with module names if
their address falls within a range that belongs to one or more built-in
modules.
It then processes the vmlinux.map (and if needed, vmlinux.o.map) to
verify the annotation:
- For each top-level section:
- For each object in the section:
- Determine whether the object is part of a built-in module
(using modules.builtin and the .*.cmd file used to compile
the object as suggested in [0])
- For each symbol in that object, verify that the built-in
module association (or lack thereof) matches the annotation
given to the symbol.
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Sam James <sam@gentoo.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.ubsan')
0 files changed, 0 insertions, 0 deletions