From: Greg KH <gregkh@linuxfoundation.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, antonio.gomez.iglesias@intel.com,
tony.luck@intel.com, dave.hansen@linux.intel.com
Subject: Re: [PATCH ebpf v2 2/2] bpf: Make unprivileged bpf depend on CONFIG_CPU_SPECTRE
Date: Thu, 28 Oct 2021 18:44:42 +0200 [thread overview]
Message-ID: <YXrTev6WMXry9pFI@kroah.com> (raw)
In-Reply-To: <20211028135751.GA41384@lakrids.cambridge.arm.com>
On Thu, Oct 28, 2021 at 02:57:51PM +0100, Mark Rutland wrote:
> On Wed, Oct 27, 2021 at 06:35:44PM -0700, Pawan Gupta wrote:
> > Disabling unprivileged BPF would help prevent unprivileged users from
> > creating the conditions required for potential speculative execution
> > side-channel attacks on affected hardware. A deep dive on such attacks
> > and mitigation is available here [1].
> >
> > If an architecture selects CONFIG_CPU_SPECTRE, disable unprivileged BPF
> > by default. An admin can enable this at runtime, if necessary.
> >
> > Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
> >
> > [1] https://ebpf.io/summit-2021-slides/eBPF_Summit_2021-Keynote-Daniel_Borkmann-BPF_and_Spectre.pdf
> > ---
> > kernel/bpf/Kconfig | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
> > index a82d6de86522..510a5a73f9a2 100644
> > --- a/kernel/bpf/Kconfig
> > +++ b/kernel/bpf/Kconfig
> > @@ -64,6 +64,7 @@ config BPF_JIT_DEFAULT_ON
> >
> > config BPF_UNPRIV_DEFAULT_OFF
> > bool "Disable unprivileged BPF by default"
> > + default y if CPU_SPECTRE
>
> Why can't this just be "default y"?
Because not all arches are broken.
> This series makes that the case on x86, and if SW is going to have to
> deal with that we may as well do that everywhere, and say that on all
> architectures we leave it to the sysadmin or kernel builder to optin to
> permitting unprivileged BPF.
>
> If we can change the default for x86 I see no reason we can't change
> this globally, and we avoid tying this to CPU_SPECTRE specifically.
No, this is a spectre-like issue only, if you have hardware that does
not have these types of issues, why wouldn't this be ok to be disabled?
thanks,
greg k-h
prev parent reply other threads:[~2021-10-28 16:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 1:32 [PATCH ebpf v2 0/2] Unprivileged BPF default Pawan Gupta
2021-10-28 1:33 ` [PATCH v2 1/2] arch/Kconfig: Make CONFIG_CPU_SPECTRE available for all architectures Pawan Gupta
2021-10-28 1:33 ` Pawan Gupta
2021-10-28 5:27 ` Greg KH
2021-10-28 5:27 ` Greg KH
2021-10-28 13:49 ` Mark Rutland
2021-10-28 13:49 ` Mark Rutland
2021-10-28 19:36 ` Pawan Gupta
2021-10-28 19:36 ` Pawan Gupta
2021-10-29 9:22 ` Mark Rutland
2021-10-29 9:22 ` Mark Rutland
2021-10-29 16:05 ` Daniel Borkmann
2021-10-29 16:05 ` Daniel Borkmann
2021-10-29 19:15 ` Pawan Gupta
2021-10-29 19:15 ` Pawan Gupta
2021-10-29 10:08 ` Russell King (Oracle)
2021-10-29 10:08 ` Russell King (Oracle)
2021-10-29 22:51 ` Pawan Gupta
2021-10-29 22:51 ` Pawan Gupta
2021-10-28 1:35 ` [PATCH ebpf v2 2/2] bpf: Make unprivileged bpf depend on CONFIG_CPU_SPECTRE Pawan Gupta
2021-10-28 5:34 ` Greg KH
2021-10-28 19:38 ` Pawan Gupta
2021-10-28 13:57 ` Mark Rutland
2021-10-28 16:44 ` Greg KH [this message]
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=YXrTev6WMXry9pFI@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andrii@kernel.org \
--cc=antonio.gomez.iglesias@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=songliubraving@fb.com \
--cc=tony.luck@intel.com \
--cc=yhs@fb.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.