From: Dave Hansen <dave.hansen@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: bpf@vger.kernel.org, kkd@meta.com,
Puranjay Mohan <puranjay@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Rishabh Iyer <rishabh.iyer@berkeley.edu>,
Sanidhya Kashyap <sanidhya.kashyap@epfl.ch>,
x86@kernel.org, kernel-team@fb.com, "Shutemov,
Kirill" <kirill.shutemov@intel.com>
Subject: Re: [PATCH bpf-next v3 1/2] x86: Perform BPF exception fixup in do_user_addr_fault
Date: Mon, 4 Nov 2024 10:09:47 -0800 [thread overview]
Message-ID: <b9395010-d59a-4ac9-9af8-2cb6710e06c2@intel.com> (raw)
In-Reply-To: <CAP01T77v+__RvLOpfyezfwvyZ1EjZ3gGRPkQMn_6uim0HfB31g@mail.gmail.com>
On 11/4/24 09:50, Kumar Kartikeya Dwivedi wrote:
> While reading invalid memory is a rare case that should not happen,
> it may be possible if some kernel field contains a stale address
> etc.
Reading random (unaccepted) memory in a TDX guest is fatal, even from
kernel addresses. We had a lot of fun even getting
load_unaligned_zeropad() to work.
So, honestly, if you've letting buggy BFP programs get loaded and read
random memory (kernel or user), you've got bigger problems than a
verbose kernel panic when the buggy program happens to touch userspace.
I'd rather not hack code into the page fault handler to add to the
illusion that this is a good idea or safe in any way.
next prev parent reply other threads:[~2024-11-04 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 19:35 [PATCH bpf-next v3 0/2] Zero overhead PROBE_MEM Kumar Kartikeya Dwivedi
2024-11-03 19:35 ` [PATCH bpf-next v3 1/2] x86: Perform BPF exception fixup in do_user_addr_fault Kumar Kartikeya Dwivedi
2024-11-04 17:16 ` Dave Hansen
2024-11-04 17:50 ` Kumar Kartikeya Dwivedi
2024-11-04 18:09 ` Dave Hansen [this message]
2024-11-03 19:35 ` [PATCH bpf-next v3 2/2] bpf, x86: Skip bounds checking for PROBE_MEM with SMAP Kumar Kartikeya Dwivedi
2024-11-04 19:53 ` Peter Zijlstra
2024-11-05 18:35 ` Alexei Starovoitov
2024-11-06 15:21 ` Peter Zijlstra
2024-11-04 16:48 ` [PATCH bpf-next v3 0/2] Zero overhead PROBE_MEM Dave Hansen
2024-11-04 17:01 ` Kumar Kartikeya Dwivedi
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=b9395010-d59a-4ac9-9af8-2cb6710e06c2@intel.com \
--to=dave.hansen@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=eddyz87@gmail.com \
--cc=kernel-team@fb.com \
--cc=kirill.shutemov@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kkd@meta.com \
--cc=luto@kernel.org \
--cc=martin.lau@kernel.org \
--cc=memxor@gmail.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=puranjay@kernel.org \
--cc=rishabh.iyer@berkeley.edu \
--cc=sanidhya.kashyap@epfl.ch \
--cc=song@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yonghong.song@linux.dev \
/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