----- On Dec 25, 2019, at 6:39 AM, Borislav Petkov bp@alien8.de wrote:
On Wed, Dec 25, 2019 at 10:38:53AM -0000, tip-bot2 for Mathieu Desnoyers wrote:
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@efficios.com AuthorDate: Wed, 11 Dec 2019 11:17:11 -05:00 Committer: Ingo Molnar mingo@kernel.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@efficios.com Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Cc: Linus Torvalds torvalds@linux-foundation.org Cc: Peter Zijlstra peterz@infradead.org Cc: Thomas Gleixner tglx@linutronix.de Link: https://lkml.kernel.org/r/20191211161713.4490-2-mathieu.desnoyers@efficios.c... Signed-off-by: Ingo Molnar mingo@kernel.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)
/* Unregister rseq for current thread. */ if (current->rseq != rseq || !current->rseq) return -EINVAL;return -EINVAL;
Cc: stable perhaps?
This could indeed be a candidate for stable, even though it's just a stricter checking of unknown flags (returning an error rather than ignoring them).
Adding stable in CC here.
Thanks,
Mathieu
----- On Dec 26, 2019, at 5:32 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:
----- On Dec 25, 2019, at 6:39 AM, Borislav Petkov bp@alien8.de wrote:
On Wed, Dec 25, 2019 at 10:38:53AM -0000, tip-bot2 for Mathieu Desnoyers wrote:
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@efficios.com AuthorDate: Wed, 11 Dec 2019 11:17:11 -05:00 Committer: Ingo Molnar mingo@kernel.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@efficios.com Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Cc: Linus Torvalds torvalds@linux-foundation.org Cc: Peter Zijlstra peterz@infradead.org Cc: Thomas Gleixner tglx@linutronix.de Link: https://lkml.kernel.org/r/20191211161713.4490-2-mathieu.desnoyers@efficios.c... Signed-off-by: Ingo Molnar mingo@kernel.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)
/* Unregister rseq for current thread. */ if (current->rseq != rseq || !current->rseq) return -EINVAL;return -EINVAL;
Cc: stable perhaps?
This could indeed be a candidate for stable, even though it's just a stricter checking of unknown flags (returning an error rather than ignoring them).
Adding stable in CC here.
For the records, I had stable in CC in my original patch submission. The stable CC has been stripped when it was merged into the tip tree.
Thanks,
Mathieu
Thanks,
Mathieu
-- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
On Mon, Jan 06, 2020 at 02:14:47PM -0500, Mathieu Desnoyers wrote:
For the records, I had stable in CC in my original patch submission. The stable CC has been stripped when it was merged into the tip tree.
Argh, lemme go fix my scripts _again_..
I was recently made aware that we should not have spurious Cc: tags in commit messages, but obviously the stable thing is an exception there.
linux-stable-mirror@lists.linaro.org