Re: [for-next][PATCH 4/6] scripts/sorttable: Zero out weak functions in mcount_loc table

From: Steven Rostedt
Date: Mon Feb 24 2025 - 13:19:31 EST


On Mon, 24 Feb 2025 10:08:05 -0800
Nathan Chancellor <nathan@xxxxxxxxxx> wrote:

> Our CI and KernelCI reports that this change as commit ef378c3b8233
> ("scripts/sorttable: Zero out weak functions in mcount_loc table") in
> next-20250224 breaks when an architecture does not have kaslr_offset()
> defined:
>
> $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mrproper allmodconfig kernel/trace/ftrace.o
> kernel/trace/ftrace.c: In function 'ftrace_process_locs':
> kernel/trace/ftrace.c:7074:24: error: implicit declaration of function 'kaslr_offset' [-Wimplicit-function-declaration]
> 7074 | kaslr = !mod ? kaslr_offset() : 0;
> | ^~~~~~~~~~~~
>
> https://lore.kernel.org/CACo-S-0GeJjWWcrGvos_Avg2FwGU2tj2QZpgoHOvPT+YbyknSg@xxxxxxxxxxxxxx/

Thanks, I'll add a patch to put an #ifdef around it.

Now the question is, can it still change the address of it with out kaslr_offset()?

-- Steve