Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers/xen/xenbus: Fix namespace collision and split() section placement with AutoFDO

When compiling the kernel with -ffunction-sections enabled, the split()
function gets compiled into the .text.split section. In some cases it
can even be cloned into .text.split.constprop.0 or .text.split.isra.0.

However, .text.split.* is already reserved for use by the Clang
-fsplit-machine-functions flag, which is used by AutoFDO. That may
place part of a function's code in a .text.split.<func> section.

This naming conflict causes the vmlinux linker script to wrongly place
split() with other .text.split.* code, rather than where it belongs with
regular text.

Fix it by renaming split() to split_strings().

Fixes: 6568f14cb5ae ("vmlinux.lds: Exclude .text.startup and .text.exit from TEXT_MAIN")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: live-patching@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://patch.msgid.link/92a194234a0f757765e275b288bb1a7236c2c35c.1762991150.git.jpoimboe@kernel.org

authored by

Josh Poimboeuf and committed by
Ingo Molnar
0330b7fb 56255fa9

+2 -2
+2 -2
drivers/xen/xenbus/xenbus_xs.c
··· 410 410 return (!buffer) ? ERR_PTR(-ENOMEM) : buffer; 411 411 } 412 412 413 - static char **split(char *strings, unsigned int len, unsigned int *num) 413 + static char **split_strings(char *strings, unsigned int len, unsigned int *num) 414 414 { 415 415 char *p, **ret; 416 416 ··· 448 448 if (IS_ERR(strings)) 449 449 return ERR_CAST(strings); 450 450 451 - return split(strings, len, num); 451 + return split_strings(strings, len, num); 452 452 } 453 453 EXPORT_SYMBOL_GPL(xenbus_directory); 454 454