Merge branch 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull rseq updates from Ingo Molnar: "A cleanup and a fix to comments" * 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rseq: Remove superfluous rseq_len from task_struct rseq: Clean up comments by reflecting removal of event counter
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user