RSEQ updates for v5.2
Subsystems (4)
Linus,
Please pull the latest core-rseq-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-rseq-for-linus
# HEAD: 83b0b15bcb0f700e7c1d070aae2e7841170a4c33 rseq: Remove superfluous rseq_len from task_struct
A cleanup and a fix to comments.
Thanks,
Ingo
------------------>
Mathieu Desnoyers (2):
rseq: Clean up comments by reflecting removal of event counter
rseq: Remove superfluous rseq_len from task_struct
arch/arm/kernel/signal.c | 3 +-- arch/x86/kernel/signal.c | 5 +---- include/linux/sched.h | 4 ---- kernel/rseq.c | 9 +++------ 4 files changed, 5 insertions(+), 16 deletions(-)
arch/arm/kernel/signal.c +1 -2
@@ -549,8 +549,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)int ret;/* -* Increment event counter and perform fixup for the pre-signal -* frame. +* Perform fixup for the pre-signal frame. */ rseq_signal_deliver (ksig, regs);
arch/x86/kernel/signal.c +1 -4
@@ -688,10 +688,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)sigset_t *set =sigmask_to_save ();compat_sigset_t *cset = (compat_sigset_t *) set; -/* -* Increment event counter and perform fixup for the pre-signal -* frame. -*/ +/* Perform fixup for the pre-signal frame. */ rseq_signal_deliver (ksig, regs);/* Set up the stack frame */
include/linux/sched.h +0 -4
@@ -1057,7 +1057,6 @@ struct task_struct {#ifdef CONFIG_RSEQ struct rseq __user *rseq; -u32 rseq_len;u32 rseq_sig;/* * RmW on rseq_event_mask must be performed atomically
@@ -1855,12 +1854,10 @@ static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) {if (clone_flags &CLONE_THREAD ) { t->rseq =NULL ; - t->rseq_len =0 ; t->rseq_sig =0 ; t->rseq_event_mask =0 ; }else { t->rseq = current->rseq; - t->rseq_len = current->rseq_len; t->rseq_sig = current->rseq_sig; t->rseq_event_mask = current->rseq_event_mask; }
@@ -1869,7 +1866,6 @@ static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)static inline void rseq_execve (struct task_struct *t) { t->rseq =NULL ; - t->rseq_len =0 ; t->rseq_sig =0 ; t->rseq_event_mask =0 ; }
kernel/rseq.c +3 -6
@@ -254,8 +254,7 @@ static int rseq_ip_fixup(struct pt_regs *regs)* - signal delivery, * and return to user-space. * -* This is how we can ensure that the entire rseq critical section, -* consisting of both the C part and the assembly instruction sequence, +* This is how we can ensure that the entire rseq critical section * will issue the commit instruction only if executed atomically with * respect to other threads scheduled on the same CPU, and with respect * to signal handlers.
@@ -314,7 +313,7 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len,/* Unregister rseq for current thread. */ if (current->rseq != rseq || !current->rseq)return -EINVAL ; -if (current->rseq_len != rseq_len) +if (rseq_len !=sizeof (*rseq))return -EINVAL ;if (current->rseq_sig != sig)return -EPERM ;
@@ -322,7 +321,6 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len,if (ret)return ret; current->rseq =NULL ; - current->rseq_len =0 ; current->rseq_sig =0 ;return 0 ; }
@@ -336,7 +334,7 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len,* the provided address differs from the prior * one. */ -if (current->rseq != rseq || current->rseq_len != rseq_len) +if (current->rseq != rseq || rseq_len !=sizeof (*rseq))return -EINVAL ;if (current->rseq_sig != sig)return -EPERM ;
@@ -354,7 +352,6 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len,if (!access_ok (rseq, rseq_len))return -EFAULT ; current->rseq = rseq; - current->rseq_len = rseq_len; current->rseq_sig = sig;/* * If rseq was previously inactive, and has just been
The pull request you sent on Mon, 6 May 2019 09:58:42 +0200:
The pull request you sent on Mon, 6 May 2019 09:58:42 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitcore-rseq-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e50c5d2e725eb7192a62868d4a9987907741ff62
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker