From: Dave Hansen <dave.hansen@intel.com>
To: speck@linutronix.de
Cc: Dave Hansen <dave.hansen@intel.com>
Subject: [MODERATED] [PATCH 0/5] SSB extra v2 0
Date: Mon, 7 May 2018 16:18:41 -0700 [thread overview]
Message-ID: <cover.1525734796.git.dave.hansen@intel.com> (raw)
This is still highly RFC. I would mostly like feedback from folks
as to whether the overall method of plugging into BPF is more
acceptable now. This has not been tested on real hardware yet.
--
BPF is a potential source of gadgets that can be used for memory
diambiguation-based attacks. To help mitigate these, we enable
the bit in SPEC_CTRL which enables the reduced (memory)
speculation mode on the processor when runing BPF code.
This improves on the last version quite a bit: there is no overhead
for unmitigated BPF programs. Instead of calling the mitigation
code unconditionally, we stick it in a wrapper function which then
calls the real BPF payload. In the unmitigated case, the function
pointer just points to the payload directly.
This also does not do any of the arch-specific bits. Thomas has
some code to do that.
Big caveat: I've only been looking at BPF for a couple of days.
I'm not deepy familiar with the code and I'm positive there are bugs
and tons of ways to optimize this.
Thomas Gleixner(1):
bpf: Add speculation control interface
Dave Hansen (4):
bpf: install mitigation wrapper for untrusted programs
bpf: set prog->need_mitigation when calling other programs
bpf: populate prog->need_mitigation for unprivileged programs
bpf: only mitigate programs that write to memory
include/linux/bpf_verifier.h | 1 +
include/linux/filter.h | 7 ++++++-
include/linux/nospec.h | 4 ++++
kernel/bpf/core.c | 14 ++++++++++++++
kernel/bpf/verifier.c | 13 +++++++++++++
net/core/filter.c | 25 +++++++++++++++++++++++++
6 files changed, 63 insertions(+), 1 deletion(-)
--
2.9.5
next reply other threads:[~2018-05-07 23:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 23:18 Dave Hansen [this message]
2018-05-07 23:18 ` [MODERATED] [PATCH 1/5] SSB extra v2 1 Dave Hansen
2018-05-07 23:18 ` [MODERATED] [PATCH 2/5] SSB extra v2 2 Dave Hansen
2018-05-07 23:18 ` [MODERATED] [PATCH 3/5] SSB extra v2 3 Dave Hansen
2018-05-07 23:18 ` [MODERATED] [PATCH 4/5] SSB extra v2 4 Dave Hansen
2018-05-07 23:18 ` [MODERATED] [PATCH 5/5] SSB extra v2 5 Dave Hansen
2018-05-08 0:36 ` [MODERATED] " Andi Kleen
2018-05-08 0:46 ` Dave Hansen
2018-05-09 15:36 ` Thomas Gleixner
2018-05-09 15:43 ` [MODERATED] " Dave Hansen
2018-05-09 15:55 ` Greg KH
2018-05-09 16:03 ` Dave Hansen
2018-05-09 16:05 ` Jiri Kosina
2018-05-09 16:36 ` Dave Hansen
2018-05-16 15:23 ` Jon Masters
2018-05-09 21:04 ` Linus Torvalds
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=cover.1525734796.git.dave.hansen@intel.com \
--to=dave.hansen@intel.com \
--cc=speck@linutronix.de \
/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.