<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/verify_builtin_ranges.awk, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-09-20T00:21:52+00:00</updated>
<entry>
<title>scripts: add verifier script for builtin module range data</title>
<updated>2024-09-20T00:21:52+00:00</updated>
<author>
<name>Kris Van Hees</name>
<email>kris.van.hees@oracle.com</email>
</author>
<published>2024-09-06T14:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac7bd0945e3db5253bd03bfc40e71afafb08d225'/>
<id>urn:sha1:ac7bd0945e3db5253bd03bfc40e71afafb08d225</id>
<content type='text'>
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 &lt;kris.van.hees@oracle.com&gt;
Reviewed-by: Nick Alcock &lt;nick.alcock@oracle.com&gt;
Reviewed-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Tested-by: Sam James &lt;sam@gentoo.org&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Tested-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
