From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-tip-commits <linux-tip-commits@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>,
stable <stable@vger.kernel.org>
Subject: Re: [tip: core/urgent] rseq: Reject unknown flags on rseq unregister
Date: Mon, 6 Jan 2020 14:14:47 -0500 (EST) [thread overview]
Message-ID: <1732849021.873.1578338087928.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1460494267.15769.1577399533860.JavaMail.zimbra@efficios.com>
----- 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.com
>>> 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)
>>> + return -EINVAL;
>>> /* Unregister rseq for current thread. */
>>> if (current->rseq != rseq || !current->rseq)
>>> 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
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2020-01-06 19:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 16:17 [PATCH for 5.5 0/3] Restartable Sequences Fixes Mathieu Desnoyers
2019-12-11 16:17 ` [PATCH for 5.5 1/3] rseq: Fix: Reject unknown flags on rseq unregister Mathieu Desnoyers
2019-12-25 10:38 ` [tip: core/urgent] rseq: " tip-bot2 for Mathieu Desnoyers
2019-12-25 11:39 ` Borislav Petkov
2019-12-26 22:32 ` Mathieu Desnoyers
2020-01-06 19:14 ` Mathieu Desnoyers [this message]
2020-01-07 13:35 ` Peter Zijlstra
2019-12-11 16:17 ` [PATCH for 5.5 2/3] rseq: Fix: Unregister rseq for clone CLONE_VM Mathieu Desnoyers
2019-12-25 10:38 ` [tip: core/urgent] rseq: " tip-bot2 for Mathieu Desnoyers
2019-12-11 16:17 ` [PATCH for 5.5 3/3] rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30 Mathieu Desnoyers
2019-12-20 1:44 ` Shuah Khan
2019-12-20 14:48 ` [PATCH for 5.5 0/3] Restartable Sequences Fixes Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1732849021.873.1578338087928.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox