diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-16 13:47:14 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-16 13:47:14 +0300 |
| commit | f3f5d52d6bcdf190891601a11910cdd596963c1e (patch) | |
| tree | b60d68febfddc2673f4fc0e1c66c0bdce21d1dd3 /include/linux/rseq.h | |
| parent | ad6bb64332bb4297110950769ad5af52791e33a2 (diff) | |
| parent | f338e77383789c0cae23ca3d48adcc5e9e137e3c (diff) | |
| download | linux-f3f5d52d6bcdf190891601a11910cdd596963c1e.tar.xz | |
Merge 7.0-rc4 into staging-next
We need the staging driver fixes in here to build on top of
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/rseq.h')
| -rw-r--r-- | include/linux/rseq.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/rseq.h b/include/linux/rseq.h index 7a01a0760405..b9d62fc2140d 100644 --- a/include/linux/rseq.h +++ b/include/linux/rseq.h @@ -146,6 +146,18 @@ static inline void rseq_fork(struct task_struct *t, u64 clone_flags) t->rseq = current->rseq; } +/* + * Value returned by getauxval(AT_RSEQ_ALIGN) and expected by rseq + * registration. This is the active rseq area size rounded up to next + * power of 2, which guarantees that the rseq structure will always be + * aligned on the nearest power of two large enough to contain it, even + * as it grows. + */ +static inline unsigned int rseq_alloc_align(void) +{ + return 1U << get_count_order(offsetof(struct rseq, end)); +} + #else /* CONFIG_RSEQ */ static inline void rseq_handle_slowpath(struct pt_regs *regs) { } static inline void rseq_signal_deliver(struct ksignal *ksig, struct pt_regs *regs) { } |
