Re: [PATCH] ftrace: x86: Fix a compile error about get_kernel_nofault()

Peter Zijlstra
2025-02-13T10:40:26Z

On Thu, Feb 13, 2025 at 06:25:41PM +0800, Haiyue Wang wrote:

> It is header file include indirect :-)
>
> https://lore.kernel.org/linux-trace-kernel/20250206131711.ea536f165d5b5980b3909acd@kernel.org/T/#t
>
> File "asm-prototypes.h" is added to entry.S by 'scripts/Makefile.build',
> adding the missed declaration header file can also fix the error:
>
> getasmexports = \
> { echo "\#include <linux/kernel.h>" ; \
> echo "\#include <linux/string.h>" ; \
> + echo "\#include <linux/uaccess.h>"; \
> echo "\#include <asm/asm-prototypes.h>" ; \
> $(call getexportsymbols,EXPORT_SYMBOL(\1);) ; }
>

So this is simple enough; but the thread you link to also has another
hunk, which makes the whole thing unfortunate.

I'm not entirely sure what this GENDWARFKSYMS nonsense is about, but it
should not clutter the code like that.