From: Daniel Borkmann <daniel@iogearbox.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, bgregg@netflix.com
Subject: Re: Question on "uaccess: Add strict non-pagefault kernel-space read function"
Date: Fri, 3 Apr 2020 16:20:24 +0200 [thread overview]
Message-ID: <5ddc8c04-279d-9a14-eaa7-755467902ead@iogearbox.net> (raw)
In-Reply-To: <20200403133533.GA3424@infradead.org>
Hi Christoph,
On 4/3/20 3:35 PM, Christoph Hellwig wrote:
[...]
> I just stumbled over your above commit, and it really confuses me.
>
> Not the newly added functions, which seems perfectly sane, but why you
> left the crazy old functions in place instead of investing a little
> bit of extra effort to clean the existing mess up and switch everyone
> to the sane new variants?
With crazy old functions I presume you mean the old bpf_probe_read()
which is mapped to BPF_FUNC_probe_read helper or something else entirely?
For the former, basically my main concern was that these would otherwise
break existing tools like bcc/bpftrace/.. unfortunately until they are not
converted over yet to _strict variants.
At least on x86, they would still rely on the broken semantic to probe
kernel and user memory with probe_read where it 'happens to work', but not
on other archs where the address space is not shared.
But once these are fixed, I would love to deprecate these in one way or
another. The warning in 00c42373d397 ("x86-64: add warning for non-canonical
user access address dereferences") should be a good incentive to switch
since people have been hitting it in production as the non-canonical space
is sometimes used in user space to tag pointers, for example.
Thanks,
Daniel
next prev parent reply other threads:[~2020-04-03 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 13:35 Christoph Hellwig
2020-04-03 14:20 ` Daniel Borkmann [this message]
2020-04-04 9:31 ` Christoph Hellwig
2020-04-07 9:03 ` Daniel Borkmann
2020-04-07 9:33 ` Christoph Hellwig
2020-04-08 0:15 ` Daniel Borkmann
2020-04-03 19:07 ` Thomas Gleixner
2020-04-03 19:09 ` Thomas Gleixner
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=5ddc8c04-279d-9a14-eaa7-755467902ead@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bgregg@netflix.com \
--cc=bpf@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=torvalds@linux-foundation.org \
--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
all inboxes | Powered by JetHome®