[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f1606ac-23fe-4dff-bf79-ab1bdc84a35e@163.com>
Date: Thu, 13 Feb 2025 18:50:39 +0800
From: Haiyue Wang <haiyuewa@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Sami Tolvanen <samitolvanen@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>,
"Masami Hiramatsu (Google)" <mhiramat@...nel.org>,
Gabriel de Perthuis <g2p.code@...il.com>, Mark Rutland
<mark.rutland@....com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H . Peter Anvin"
<hpa@...or.com>, x86@...nel.org, linux-trace-kernel@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ftrace: x86: Fix a compile error about
get_kernel_nofault()
On 2025/2/13 18:40, Peter Zijlstra wrote:
> 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.
By my understanding, the GENDWARFKSYMS design triggers the missing
header file, even this is inline function, but it will call another
function. It needs to "see" the header file firstly:
So this also fix the error:
--- a/arch/x86/include/asm/asm-prototypes.h
+++ b/arch/x86/include/asm/asm-prototypes.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#include <asm/ftrace.h>
#include <linux/uaccess.h>
#include <linux/pgtable.h>
+#include <asm/ftrace.h>
Powered by blists - more mailing lists