Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: KP Singh <kpsingh@kernel.org>
Cc: security@kernel.org, pjt@google.com, evn@google.com,
	jpoimboe@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
	hpa@zytor.com, peterz@infradead.org,
	pawan.kumar.gupta@linux.intel.com, kim.phillips@amd.com,
	alexandre.chartre@oracle.com, daniel.sneddon@linux.intel.com,
	"José Oliveira" <joseloliveira11@gmail.com>,
	"Rodrigo Branco" <rodrigo@kernelhacking.com>,
	"Alexandra Sandulescu" <aesa@google.com>,
	"Jim Mattson" <jmattson@google.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86/speculation: Fix user-mode spectre-v2 protection with KERNEL_IBRS
Date: Mon, 20 Feb 2023 12:38:35 +0100	[thread overview]
Message-ID: <Y/Nbu2p9CGG/nwcW@kroah.com> (raw)
In-Reply-To: <CACYkzJ44dwK8HZFnLNOvGSS_Uo3U0NUP_a41+t6oc8d=UAqRwA@mail.gmail.com>

On Mon, Feb 20, 2023 at 03:25:08AM -0800, KP Singh wrote:
> On Mon, Feb 20, 2023 at 3:20 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Mon, Feb 20, 2023 at 03:11:24AM -0800, KP Singh wrote:
> > > On Mon, Feb 20, 2023 at 2:52 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > On Mon, Feb 20, 2023 at 11:39:30AM +0100, KP Singh wrote:
> > > > > With the introduction of KERNEL_IBRS, STIBP is no longer needed
> > > > > to prevent cross thread training in the kernel space. When KERNEL_IBRS
> > > > > was added, it also disabled the user-mode protections for spectre_v2.
> > > > > KERNEL_IBRS does not mitigate cross thread training in the userspace.
> > > > >
> > > > > In order to demonstrate the issue, one needs to avoid syscalls in the
> > > > > victim as syscalls can shorten the window size due to
> > > > > a user -> kernel -> user transition which sets the
> > > > > IBRS bit when entering kernel space and clearing any training the
> > > > > attacker may have done.
> > > > >
> > > > > Allow users to select a spectre_v2_user mitigation (STIBP always on,
> > > > > opt-in via prctl) when KERNEL_IBRS is enabled.
> > > > >
> > > > > Reported-by: José Oliveira <joseloliveira11@gmail.com>
> > > > > Reported-by: Rodrigo Branco <rodrigo@kernelhacking.com>
> > > > > Reviewed-by: Alexandra Sandulescu <aesa@google.com>
> > > > > Reviewed-by: Jim Mattson <jmattson@google.com>
> > > > > Fixes: 7c693f54c873 ("x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS")
> > > > > Cc: stable@vger.kernel.org
> > > > > Signed-off-by: KP Singh <kpsingh@kernel.org>
> > > > > ---
> > > > >  arch/x86/kernel/cpu/bugs.c | 25 +++++++++++++++++--------
> > > > >  1 file changed, 17 insertions(+), 8 deletions(-)
> > > >
> > > > As this is posted publicly, there's no need to send it to
> > > > security@kernel.org, it doesn't need to be involved.
> > >
> > > Sure, it's okay. Please do note in my first patch, I did follow
> > > https://www.kernel.org/doc/Documentation/admin-guide/security-bugs.rst,
> > > if you want folks to explicitly Cc maintainers with their fix or
> > > report, I think it's worth mentioning in the guidelines there as the
> > > current language seems to imply that the maintainers will be pulled in
> > > by the security team:
> > >
> > > "It is possible that the security team will bring in extra help from
> > > area maintainers to understand and fix the security vulnerability."
> >
> > Yes, but you already have a patch here, what "help" do you need?  You
> > didn't specify any help, you just sent us a patch with no context.  This
> > wasn't any sort of a "report" or "hey, I think we found a problem over
> > here, does this change look correct", right?
> >
> > So please be specific as to what you are asking for, otherwise we have
> > to guess (i.e. you cc:ed a seemingly random set of people but not the
> 
> I don't see how it matters who I cc on the list.

It gives us a hint as to who you are leaving out, right?

> Anyways, I am still
> not clear on what one is supposed to do in the case when one has a
> patch for an issue already. Should this not be send it to security@?

security@ is to take reports of potential security problems, triage
them, and drag in the respective people to fix the problem as soon as
possible by creating a patch and getting it merged.

You already had a patch, so you did all of the work that security@ would
normally do, so what did you need us to do here?

You also did not ask or request anything, you just sent a patch with no
context other than the changelog text.

So if you have a fix for a potential problem already, you either just
send it to get it merged as soon as possible, in which case security@ is
not needed.  Or if you want to ask questions "is this really an issue
and is this the fix", then send the patch and ask that question.

Again, as it is, this looks like any other normal patch sent to
subsystems for review, and there was no request for help or context at
all.  Then you sent the patch to a public mailing list, so security@ is
not needed at al, the normal development process applies as you
determined it's not a secret by doing so.

If you have questions, ask them, we can't read minds.

thanks,

greg k-h

  parent reply	other threads:[~2023-02-20 11:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 10:39 [PATCH] x86/speculation: Fix user-mode spectre-v2 protection with KERNEL_IBRS KP Singh
2023-02-20 10:52 ` Greg KH
2023-02-20 11:11   ` KP Singh
2023-02-20 11:20     ` Greg KH
2023-02-20 11:25       ` KP Singh
2023-02-20 11:25         ` KP Singh
2023-02-20 11:38         ` Greg KH [this message]
2023-02-20 11:48           ` KP Singh
2023-02-20 13:59             ` Borislav Petkov
2023-02-20 11:38   ` Josh Poimboeuf
2023-02-20 11:49     ` KP Singh
2023-02-20 12:07 ` Josh Poimboeuf
2023-02-20 12:11   ` Josh Poimboeuf

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=Y/Nbu2p9CGG/nwcW@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aesa@google.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=bp@alien8.de \
    --cc=daniel.sneddon@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=evn@google.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joseloliveira11@gmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=kim.phillips@amd.com \
    --cc=kpsingh@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rodrigo@kernelhacking.com \
    --cc=security@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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