<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/kallsyms.c, branch v7.0-rc7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-22T22:58:22+00:00</updated>
<entry>
<title>kallsyms: Get rid of kallsyms relative base</title>
<updated>2026-01-22T22:58:22+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2026-01-16T09:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a081b5789255d27b76cd2cbab85676b2a31dbde1'/>
<id>urn:sha1:a081b5789255d27b76cd2cbab85676b2a31dbde1</id>
<content type='text'>
When the kallsyms relative base was introduced, per-CPU variable
references on x86_64 SMP were implemented as offsets into the respective
per-CPU region, rather than offsets relative to the location of the
variable's template in the kernel image, which is how other
architectures implement it.

This required kallsyms to reason about the difference between the two,
and the sign of the value in the kallsyms_offsets[] array was used to
distinguish them. This meant that negative offsets were not permitted
for ordinary variables, and so it was crucial that the relative base was
chosen such that all offsets were positive numbers.

This is no longer needed: instead, the offsets can simply be encoded as
values in the range -/+ 2 GiB, which is precisely what PC32 relocations
provide on most architectures. So it is possible to simplify the logic,
and just use _text as the anchor directly, and let the linker calculate
the final value based on the location of the entry itself.

Some architectures (nios2, extensa) do not support place-relative
relocations at all, but these are all 32-bit and non-relocatable, and so
there is no need for place-relative relocations in the first place, and
the actual symbol values can just be stored directly.

This makes all entries in the kallsyms_offsets[] array visible as
place-relative references in the ELF metadata, which will be important
when implementing ELF-based fg-kaslr.

Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260116093359.2442297-6-ardb+git@google.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: Remove KALLSYMS_ABSOLUTE_PERCPU</title>
<updated>2025-02-18T09:16:04+00:00</updated>
<author>
<name>Brian Gerst</name>
<email>brgerst@gmail.com</email>
</author>
<published>2025-01-23T19:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01157ddc58dc2fe428ec17dd5a18cc13f134639f'/>
<id>urn:sha1:01157ddc58dc2fe428ec17dd5a18cc13f134639f</id>
<content type='text'>
x86-64 was the only user.

Signed-off-by: Brian Gerst &lt;brgerst@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250123190747.745588-16-brgerst@gmail.com
</content>
</entry>
<entry>
<title>kallsyms: change overflow variable to bool type</title>
<updated>2024-09-20T00:21:52+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-09-07T08:53:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a418218dadf913fe78dbe6ad6b2e31e721b84ef'/>
<id>urn:sha1:9a418218dadf913fe78dbe6ad6b2e31e721b84ef</id>
<content type='text'>
Change the 'overflow' variable to bool. Also, remove unnecessary
parentheses.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: squash output_address()</title>
<updated>2024-09-20T00:21:52+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-09-07T08:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=327df5bf540e1cde17ae35d5a043ece773c80ff6'/>
<id>urn:sha1:327df5bf540e1cde17ae35d5a043ece773c80ff6</id>
<content type='text'>
After commit 64e166099b69 ("kallsyms: get rid of code for absolute,
kallsyms"), there is only one call site for output_address(). Squash it.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: use xmalloc() and xrealloc()</title>
<updated>2024-09-01T11:34:48+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-08-12T12:48:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aeaa4283a309520c22a783071f554645943955d8'/>
<id>urn:sha1:aeaa4283a309520c22a783071f554645943955d8</id>
<content type='text'>
When malloc() or realloc() fails, there is not much userspace programs
can do. xmalloc() and xrealloc() are useful to bail out on a memory
allocation failure.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: Do not cleanup .llvm.&lt;hash&gt; suffix before sorting symbols</title>
<updated>2024-08-15T16:33:34+00:00</updated>
<author>
<name>Song Liu</name>
<email>song@kernel.org</email>
</author>
<published>2024-08-07T22:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=020925ce92990c3bf59ab2cde386ac6d9ec734ff'/>
<id>urn:sha1:020925ce92990c3bf59ab2cde386ac6d9ec734ff</id>
<content type='text'>
Cleaning up the symbols causes various issues afterwards. Let's sort
the list based on original name.

Signed-off-by: Song Liu &lt;song@kernel.org&gt;
Fixes: 8cc32a9bbf29 ("kallsyms: strip LTO-only suffixes from promoted global functions")
Reviewed-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Tested-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Acked-by: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Reviewed-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Link: https://lore.kernel.org/r/20240807220513.3100483-2-song@kernel.org
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: change sym_entry::percpu_absolute to bool type</title>
<updated>2024-07-21T16:24:22+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-20T16:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a7c8d2459edb8e082cbce1b7e516495ca913740'/>
<id>urn:sha1:1a7c8d2459edb8e082cbce1b7e516495ca913740</id>
<content type='text'>
This field is boolean.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: unify seq and start_pos fields of struct sym_entry</title>
<updated>2024-07-21T16:24:22+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-20T16:21:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d48f8feb86ee773e65c6d54856bbfb7702bd35d'/>
<id>urn:sha1:1d48f8feb86ee773e65c6d54856bbfb7702bd35d</id>
<content type='text'>
The struct sym_entry uses the 'seq' and 'start_pos' fields to remember
the index in the symbol table. They serve the same purpose and are not
used simultaneously. Unify them.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: add more original symbol type/name in comment lines</title>
<updated>2024-07-21T16:24:22+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-20T10:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9c3d671dd816ea4d5604dd04ef98d42921656a7'/>
<id>urn:sha1:f9c3d671dd816ea4d5604dd04ef98d42921656a7</id>
<content type='text'>
Commit bea5b7450474 ("kallsyms: expand symbol name into comment for
debugging") added the uncompressed type/name in the comment lines of
kallsyms_offsets.

It would be useful to do the same for kallsyms_names and
kallsyms_seqs_of_names.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: use \t instead of a tab in printf()</title>
<updated>2024-07-21T16:24:22+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-20T10:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b07e18100940418803d289a91c7d859af006b8e7'/>
<id>urn:sha1:b07e18100940418803d289a91c7d859af006b8e7</id>
<content type='text'>
This string literal uses a mixture of \t escape sequences and a tab.

Use \t consistently.

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