Skip to content

Commit 4c652a4

Browse files
arndbPeter Zijlstra
authored andcommitted
rseq: Mark rseq_arm_slice_extension_timer() __always_inline
objtool warns about this function being called inside of a uaccess section: kernel/entry/common.o: warning: objtool: irqentry_exit+0x1dc: call to rseq_arm_slice_extension_timer() with UACCESS enabled Interestingly, this happens with CONFIG_RSEQ_SLICE_EXTENSION disabled, so this is an empty function, as the normal implementation is already marked __always_inline. I could reproduce this multiple times with gcc-11 but not with gcc-15, so the compiler probably got better at identifying the trivial function. Mark all the empty helpers for !RSEQ_SLICE_EXTENSION as __always_inline for consistency, avoiding this warning. Fixes: 0ac3b5c ("rseq: Implement time slice extension enforcement timer") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260206074122.709580-1-arnd@kernel.org
1 parent 6e3c0a4 commit 4c652a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/linux/rseq_entry.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ static __always_inline bool rseq_grant_slice_extension(bool work_pending)
216216
}
217217

218218
#else /* CONFIG_RSEQ_SLICE_EXTENSION */
219-
static inline bool rseq_slice_extension_enabled(void) { return false; }
220-
static inline bool rseq_arm_slice_extension_timer(void) { return false; }
221-
static inline void rseq_slice_clear_grant(struct task_struct *t) { }
222-
static inline bool rseq_grant_slice_extension(bool work_pending) { return false; }
219+
static __always_inline bool rseq_slice_extension_enabled(void) { return false; }
220+
static __always_inline bool rseq_arm_slice_extension_timer(void) { return false; }
221+
static __always_inline void rseq_slice_clear_grant(struct task_struct *t) { }
222+
static __always_inline bool rseq_grant_slice_extension(bool work_pending) { return false; }
223223
#endif /* !CONFIG_RSEQ_SLICE_EXTENSION */
224224

225225
bool rseq_debug_update_user_cs(struct task_struct *t, struct pt_regs *regs, unsigned long csaddr);

0 commit comments

Comments
 (0)