Skip to content

Commit e87f415

Browse files
committed
task_stack, x86/cea: Force-inline stack helpers
Force-inline two stack helpers to fix the following objtool warnings: vmlinux.o: warning: objtool: in_task_stack()+0xc: call to task_stack_page() leaves .noinstr.text section vmlinux.o: warning: objtool: in_entry_stack()+0x10: call to cpu_entry_stack() leaves .noinstr.text section Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3123109 commit e87f415

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/x86/include/asm/cpu_entry_area.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ extern void cea_set_pte(void *cea_vaddr, phys_addr_t pa, pgprot_t flags);
143143

144144
extern struct cpu_entry_area *get_cpu_entry_area(int cpu);
145145

146-
static inline struct entry_stack *cpu_entry_stack(int cpu)
146+
static __always_inline struct entry_stack *cpu_entry_stack(int cpu)
147147
{
148148
return &get_cpu_entry_area(cpu)->entry_stack_page.stack;
149149
}

include/linux/sched/task_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* try_get_task_stack() instead. task_stack_page will return a pointer
1717
* that could get freed out from under you.
1818
*/
19-
static inline void *task_stack_page(const struct task_struct *task)
19+
static __always_inline void *task_stack_page(const struct task_struct *task)
2020
{
2121
return task->stack;
2222
}

0 commit comments

Comments
 (0)