<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/mksysmap, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-02-23T08:24:59+00:00</updated>
<entry>
<title>kallsyms: ignore ARMv4 thunks along with others</title>
<updated>2024-02-23T08:24:59+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-15T08:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa3866b67d5e77ead15396424d74e5a35afc5f79'/>
<id>urn:sha1:fa3866b67d5e77ead15396424d74e5a35afc5f79</id>
<content type='text'>
[ Upstream commit a951884d82886d8453d489f84f20ac168d062b38 ]

lld is now able to build ARMv4 and ARMv4T kernels, which means it can
generate thunks for those (__ARMv4PILongThunk_*, __ARMv4PILongBXThunk_*)
that can interfere with kallsyms table generation since they do not get
ignore like the corresponding ARMv5+ ones are:

Inconsistent kallsyms data
Try "make KALLSYMS_EXTRA_PASS=1" as a workaround

Replace the hardcoded list of thunk symbols with a more general regex that
covers this one along with future symbols that follow the same pattern.

Fixes: 5eb6e280432d ("ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer")
Fixes: efe6e3068067 ("kallsyms: fix nonconverging kallsyms table with lld")
Suggested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/mksysmap: Ignore prefixed KCFI symbols</title>
<updated>2023-06-26T23:35:43+00:00</updated>
<author>
<name>Pierre-Clément Tosi</name>
<email>ptosi@google.com</email>
</author>
<published>2023-06-26T12:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=71025b8565a383223ea2d94325db37cdabbcc453'/>
<id>urn:sha1:71025b8565a383223ea2d94325db37cdabbcc453</id>
<content type='text'>
The (relatively) new KCFI feature in LLVM/Clang encodes type information
for C functions by generating symbols named __kcfi_typeid_&lt;fname&gt;, which
can then be referenced from assembly. However, some custom build rules
(e.g. nVHE or early PIE on arm64) use objcopy to add a prefix to all the
symbols in their object files, making mksysmap's ignore filter miss
those KCFI symbols.

Therefore, explicitly list those twice-prefixed KCFI symbols as ignored.

Alternatively, this could also be achieved in a less verbose way by
ignoring any symbol containing the string "__kcfi_typeid_". However,
listing the combined prefixes explicitly saves us from running the small
risk of ignoring symbols that should be kept.

Signed-off-by: Pierre-Clément Tosi &lt;ptosi@google.com&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/mksysmap: Ignore __pi_ local arm64 symbols</title>
<updated>2023-06-07T13:41:08+00:00</updated>
<author>
<name>Pierre-Clément Tosi</name>
<email>ptosi@google.com</email>
</author>
<published>2023-06-06T18:19:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=200dd957a7a72278363a8f2a49d2e90491bdb1b4'/>
<id>urn:sha1:200dd957a7a72278363a8f2a49d2e90491bdb1b4</id>
<content type='text'>
Similarly to "__kvm_nvhe_", filter out any local symbol that was
prefixed with "__pi_" (generated when CONFIG_RANDOMIZE_BASE=y) when
compiling System.map and in kallsyms.

Signed-off-by: Pierre-Clément Tosi &lt;ptosi@google.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/mksysmap: Fix badly escaped '$'</title>
<updated>2023-06-07T13:41:08+00:00</updated>
<author>
<name>Pierre-Clément Tosi</name>
<email>ptosi@google.com</email>
</author>
<published>2023-06-06T17:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec336aa83162fe0f3d554baed2d4e2589b69ec6e'/>
<id>urn:sha1:ec336aa83162fe0f3d554baed2d4e2589b69ec6e</id>
<content type='text'>
The backslash characters escaping '$' in the command to sed (intended to
prevent it from interpreting '$' as "end-of-line") are currently being
consumed by the Shell (where they mean that sh should not evaluate what
follows '$' as a variable name). This means that

    sed -e "/ \$/d"

executes the script

    / $/d

instead of the intended

    / \$/d

So escape twice in mksysmap any '$' that actually needs to reach sed
escaped so that the backslash survives the Shell.

Fixes: c4802044a0a7 ("scripts/mksysmap: use sed with in-line comments")
Fixes: 320e7c9d4494 ("scripts/kallsyms: move compiler-generated symbol patterns to mksysmap")
Signed-off-by: Pierre-Clément Tosi &lt;ptosi@google.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/kallsyms: move compiler-generated symbol patterns to mksysmap</title>
<updated>2023-04-17T02:03:56+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-03-08T11:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=320e7c9d4494f7a6f046871678f582a3392235f8'/>
<id>urn:sha1:320e7c9d4494f7a6f046871678f582a3392235f8</id>
<content type='text'>
scripts/kallsyms.c maintains compiler-generated symbols, but we end up
with something similar in scripts/mksysmap to avoid the "Inconsistent
kallsyms data" error. For example, commit c17a2538704f ("mksysmap: Fix
the mismatch of 'L0' symbols in System.map").

They were separately maintained prior to commit 94ff2f63d6a3 ("kbuild:
reuse mksysmap output for kallsyms").

Now that scripts/kallsyms.c parses the output of scripts/mksysmap,
it makes more sense to collect all the ignored patterns to mksysmap.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
</content>
</entry>
<entry>
<title>scripts/kallsyms: exclude symbols generated by itself dynamically</title>
<updated>2023-04-17T02:03:56+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-03-08T11:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca09bf48f99bdc08e17da11aeae56b7ea132b7c8'/>
<id>urn:sha1:ca09bf48f99bdc08e17da11aeae56b7ea132b7c8</id>
<content type='text'>
Drop the symbols generated by scripts/kallsyms itself automatically
instead of maintaining the symbol list manually.

Pass the kallsyms object from the previous kallsyms step (if it exists)
as the third parameter of scripts/mksysmap, which will weed out the
generated symbols from the input to the next kallsyms step.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/mksysmap: use sed with in-line comments</title>
<updated>2023-04-17T02:03:56+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-03-08T11:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4802044a0a7d7dfa82af858c2fa3ae9d76249c4'/>
<id>urn:sha1:c4802044a0a7d7dfa82af858c2fa3ae9d76249c4</id>
<content type='text'>
It is not feasible to insert comments in a multi-line shell command.
Use sed, and move comments close to the code.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/mksysmap: remove comments described in nm(1)</title>
<updated>2023-04-17T02:03:56+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2023-03-08T11:52:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9f76363d0aa2d7c01288d9aad79b7e44855a435'/>
<id>urn:sha1:e9f76363d0aa2d7c01288d9aad79b7e44855a435</id>
<content type='text'>
I do not think we need to repeat what is written in 'man nm'.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: ignore __kstrtab_* and __kstrtabns_* symbols</title>
<updated>2022-10-02T18:51:58+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-09-26T09:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d32b55f4bb43466bc6cdd98a00f8a600bbf7e8ec'/>
<id>urn:sha1:d32b55f4bb43466bc6cdd98a00f8a600bbf7e8ec</id>
<content type='text'>
Every EXPORT_SYMBOL creates __kstrtab_* and __kstrtabns_*, which
consumes 15-20% of the kallsyms entries.

For example, on the system built from the x86_64 defconfig,

  $ cat /proc/kallsyms | wc
     129527    388581   5685465
  $ cat /proc/kallsyms | grep __kstrtab | wc
      23489     70467   1187932

We already ignore __crc_* symbols populated by EXPORT_SYMBOL, so it
should be fine to ignore __kstrtab_* and __kstrtabns_* as well.

This makes vmlinux a bit smaller.

  $ size vmlinux.before vmlinux.after
     text    data     bss     dec     hex filename
  22785374        8559694 1413328 32758396        1f3da7c vmlinux.before
  22785374        8137806 1413328 32336508        1ed6a7c vmlinux.after

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: drop duplicated ignore patterns from kallsyms.c</title>
<updated>2022-10-02T09:06:05+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-09-26T09:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2833d1b07ab107db71a18e6f3855f6908886361'/>
<id>urn:sha1:a2833d1b07ab107db71a18e6f3855f6908886361</id>
<content type='text'>
Now that kallsyms.c parses the output from mksysmap, some symbols have
already been dropped.

Move comments to scripts/mksysmap. Also, make the grep command readable.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
