Re: [patch 10/12] rseq: Implement rseq_grant_slice_extension()

K Prateek Nayak
2025-09-09T08:15:22Z

Hello Thomas,

On 9/9/2025 4:30 AM, Thomas Gleixner wrote:
> #else /* CONFIG_RSEQ_SLICE_EXTENSION */
> static inline bool rseq_slice_extension_enabled(void) { return false; }
> static inline bool rseq_arm_slice_extension_timer(void) { return false; }
> static inline void rseq_slice_clear_grant(struct task_struct *t) { }
> +static inline bool rseq_grant_slice_extension(bool work_pending) { return false; }

This is still under the CONFIG_RSEQ block and when building with
CONFIG_RSEQ disabled gives the following error with changes from
Patch 11:

kernel/entry/common.c:40:30: error: implicit declaration of function ‘rseq_grant_slice_extension’ [-Werror=implicit-function-declaration]
40 | if (!rseq_grant_slice_extension(ti_work & TIF_SLICE_EXT_DENY))

Putting the rseq_grant_slice_extension() definition from above in
a separate "ifndef CONFIG_RSEQ_SLICE_EXTENSION" block at the end
keeps the build happy.

> #endif /* !CONFIG_RSEQ_SLICE_EXTENSION */
>
> bool rseq_debug_update_user_cs(struct task_struct *t, struct pt_regs *regs, unsigned long csaddr);
>

--
Thanks and Regards,
Prateek