diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-03-04 11:19:21 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-03-04 11:19:21 +0100 |
| commit | cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de (patch) | |
| tree | fba004535821850f0d10cc4deac3885545083f0c /kernel/rseq.c | |
| parent | x86/ia32: Leave NULL selector values 0~3 unchanged (diff) | |
| parent | <linux/sizes.h>: Cover all possible x86 CPU cache sizes (diff) | |
| download | linux-cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de.tar.gz linux-cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de.zip | |
Merge branch 'x86/cpu' into x86/asm, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/rseq.c')
| -rw-r--r-- | kernel/rseq.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/rseq.c b/kernel/rseq.c index 442aba29bc4c..2cb16091ec0a 100644 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -507,9 +507,6 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len, return -EINVAL; if (!access_ok(rseq, rseq_len)) return -EFAULT; - current->rseq = rseq; - current->rseq_len = rseq_len; - current->rseq_sig = sig; #ifdef CONFIG_DEBUG_RSEQ /* * Initialize the in-kernel rseq fields copy for validation of @@ -522,6 +519,14 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len, return -EFAULT; #endif /* + * Activate the registration by setting the rseq area address, length + * and signature in the task struct. + */ + current->rseq = rseq; + current->rseq_len = rseq_len; + current->rseq_sig = sig; + + /* * If rseq was previously inactive, and has just been * registered, ensure the cpu_id_start and cpu_id fields * are updated before returning to user-space. |
