[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157727033331.30329.17206832903007175600.tip-bot2@tip-bot2>
Date: Wed, 25 Dec 2019 10:38:53 -0000
From: "tip-bot2 for Mathieu Desnoyers" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/urgent] rseq: Reject unknown flags on rseq unregister
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: 66528a4575eee9f5a5270219894ab6178f146e84
Gitweb: https://git.kernel.org/tip/66528a4575eee9f5a5270219894ab6178f146e84
Author: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
AuthorDate: Wed, 11 Dec 2019 11:17:11 -05:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 25 Dec 2019 10:41:20 +01:00
rseq: Reject unknown flags on rseq unregister
It is preferrable to reject unknown flags within rseq unregistration
rather than to ignore them. It is an oversight caused by the fact that
the check for unknown flags is after the rseq unregister flag check.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20191211161713.4490-2-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/rseq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/rseq.c b/kernel/rseq.c
index 27c48eb..a4f86a9 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;
Powered by blists - more mailing lists