From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled
Date: Thu, 29 Nov 2018 15:55:55 +0000 [thread overview]
Message-ID: <1543506955.2867.10.camel@codethink.co.uk> (raw)
In-Reply-To: <b1d395a1-076a-054d-09ae-9d9242b1c29a@iogearbox.net>
On Fri, 2018-11-23 at 21:10 +0100, Daniel Borkmann wrote:
> On 11/23/2018 07:34 PM, Ben Hutchings wrote:
> > User-space does not have access to the patched eBPF code, but we
> > need to be able to test that patches are being applied. Therefore
> > log distinct messages for each case that requires patching.
>
> Thanks for the patches, Ben! Above is actually not the case, e.g. privileged
> admin can use something like 'bpftool prog dump xlated id <id>' and then the
> BPF insns are dumped to user space for the program /after/ the verification,
> so the rewrites can then be seen.
Oh that's good.
> test_verifier temporarily drops caps to
> load and run the unprivileged cases, but we can extend the test suite to
> retrieve and check the final insns after that happened. I think this would be
> a nice extension to the test suite for cases like these and would also provide
> better insight than verbose() statement saying that something has been
> patched (but not the actual result of it).
Agreed; I'll look into doing this instead.
Ben.
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
next prev parent reply other threads:[~2018-11-29 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 18:33 [PATCH 0/3] bpf: Test defence against SSB exploitation Ben Hutchings
2018-11-23 18:34 ` [PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled Ben Hutchings
2018-11-23 20:10 ` Daniel Borkmann
2018-11-29 15:55 ` Ben Hutchings [this message]
2018-11-23 18:35 ` [PATCH 2/3] selftests/bpf: Add the ability to test for a log message on success Ben Hutchings
2018-11-23 18:35 ` [PATCH 3/3] selftests/bpf: Add test case for defence against SSB exploitation Ben Hutchings
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=1543506955.2867.10.camel@codethink.co.uk \
--to=ben.hutchings@codethink.co.uk \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).