lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: build warning after merge of the tip tree
On Mon, Oct 24, 2022 at 11:28:45AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> vmlinux.o: warning: objtool: get_cpu_entry_area+0x4: call to cea_offset() leaves .noinstr.text section
>
> Presumably something to do with commit
>
> 1248fb6a8201 ("x86/mm: Randomize per-cpu entry area")

Thanks, and yesh Boris said the same late on Friday... all the *SAN
stuff tickled the compiler's stupid bone again.

The below cures it, Dave, do we fold it in or mash on top?


diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index ad1f750517a1..a8f18e613190 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -18,7 +18,7 @@ DEFINE_PER_CPU(struct cea_exception_stacks*, cea_exception_stacks);

static DEFINE_PER_CPU_READ_MOSTLY(unsigned long, _cea_offset);

-static inline unsigned int cea_offset(unsigned int cpu)
+static __always_inline unsigned int cea_offset(unsigned int cpu)
{
return per_cpu(_cea_offset, cpu);
}
@@ -52,7 +52,7 @@ static __init void init_cea_offsets(void)
#else /* !X86_64 */
DECLARE_PER_CPU_PAGE_ALIGNED(struct doublefault_stack, doublefault_stack);

-static inline unsigned int cea_offset(unsigned int cpu)
+static __always_inline unsigned int cea_offset(unsigned int cpu)
{
return cpu;
}
\
 
 \ /
  Last update: 2022-10-24 11:01    [W:0.071 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site