Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Always inline task_size_max()

Fix:

vmlinux.o: warning: objtool: handle_bug()+0x10: call to task_size_max() leaves .noinstr.text section

When #UD isn't a BUG, we shouldn't violate noinstr (we'll still
probably die, but that's another story).

Fixes: 025768a966a3 ("x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210621120120.682468274@infradead.org

authored by

Peter Zijlstra and committed by
Ingo Molnar
1f008d46 4c9c26f1

+1 -1
+1 -1
arch/x86/include/asm/page_64.h
··· 75 75 * 76 76 * With page table isolation enabled, we map the LDT in ... [stay tuned] 77 77 */ 78 - static inline unsigned long task_size_max(void) 78 + static __always_inline unsigned long task_size_max(void) 79 79 { 80 80 unsigned long ret; 81 81