Skip to content

Commit

Permalink
x86: Always inline task_size_max()
Browse files Browse the repository at this point in the history
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: 025768a ("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
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 22, 2021
1 parent 4c9c26f commit 1f008d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/page_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void copy_page(void *to, void *from);
*
* With page table isolation enabled, we map the LDT in ... [stay tuned]
*/
static inline unsigned long task_size_max(void)
static __always_inline unsigned long task_size_max(void)
{
unsigned long ret;

Expand Down

0 comments on commit 1f008d4

Please sign in to comment.