diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-18 12:29:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-18 12:29:13 -0800 |
commit | ba0f47220384ff160c9df93dedbbef26d7b67f7b (patch) | |
tree | 7f389bd934db9b463529fbb6b3970927db64fb1e /kernel | |
parent | 8cac89909a30807eb4aba56a0e29f55e3b6df42f (diff) | |
parent | 463f550fb47bede3a5d7d5177f363a6c3b45d50b (diff) | |
download | linux-ba0f47220384ff160c9df93dedbbef26d7b67f7b.tar.gz linux-ba0f47220384ff160c9df93dedbbef26d7b67f7b.tar.bz2 linux-ba0f47220384ff160c9df93dedbbef26d7b67f7b.zip |
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull rseq fixes from Ingo Molnar:
"Two rseq bugfixes:
- CLONE_VM !CLONE_THREAD didn't work properly, the kernel would end
up corrupting the TLS of the parent. Technically a change in the
ABI but the previous behavior couldn't resonably have been relied
on by applications so this looks like a valid exception to the ABI
rule.
- Make the RSEQ_FLAG_UNREGISTER ABI behavior consistent with the
handling of other flags. This is not thought to impact any
applications either"
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
rseq: Unregister rseq for clone CLONE_VM
rseq: Reject unknown flags on rseq unregister
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rseq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rseq.c b/kernel/rseq.c index 27c48eb7de40..a4f86a9d6937 100644 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -310,6 +310,8 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len, int ret; if (flags & RSEQ_FLAG_UNREGISTER) { + if (flags & ~RSEQ_FLAG_UNREGISTER) + return -EINVAL; /* Unregister rseq for current thread. */ if (current->rseq != rseq || !current->rseq) return -EINVAL; |