History

rseq: Add prctl() to enable time slice extensions

Implement a prctl() so that tasks can enable the time slice extension mechanism. This fails, when time slice extensions are disabled at compile time or on the kernel command line and when no rseq pointer is registered in the kernel. That allows to implement a single trivial check in the exit to user mode hotpath, to decide whether the whole mechanism needs to be invoked.

Thomas Gleixner committed 11 months ago

Commit 28621ec1 parent b5b82824 files · +77 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/prctl.h+10−0
@@ -386,4 +386,14 @@ struct prctl_mm_map { · 385 unmodified lines
386# define PR_FUTEX_HASH_SET_SLOTS 1386# define PR_FUTEX_HASH_SET_SLOTS 1
387# define PR_FUTEX_HASH_GET_SLOTS 2387# define PR_FUTEX_HASH_GET_SLOTS 2
388 388
389/* RSEQ time slice extensions */
390#define PR_RSEQ_SLICE_EXTENSION 79
391# define PR_RSEQ_SLICE_EXTENSION_GET 1
392# define PR_RSEQ_SLICE_EXTENSION_SET 2
393/*
394 * Bits for RSEQ_SLICE_EXTENSION_GET/SET
395 * PR_RSEQ_SLICE_EXT_ENABLE: Enable
396 */
397# define PR_RSEQ_SLICE_EXT_ENABLE 0x01
398
389#endif /* _LINUX_PRCTL_H */399#endif /* _LINUX_PRCTL_H */