From: Greg KH <gregkh@linuxfoundation.org>
To: "Zidenberg, Tsahi" <tsahee@amazon.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 0/8] Fix bpf: fix userspace access for bpf_probe_read{,str}()
Date: Sat, 24 Apr 2021 16:47:25 +0200 [thread overview]
Message-ID: <YIQvfapynnC9Od+l@kroah.com> (raw)
In-Reply-To: <YILi0740FGK78Zy8@kroah.com>
On Fri, Apr 23, 2021 at 05:08:03PM +0200, Greg KH wrote:
> On Wed, Apr 21, 2021 at 04:05:32PM +0300, Zidenberg, Tsahi wrote:
> > In arm64, kernelspace address accessors cannot be used to access
> > userspace addresses, which means bpf_probe_read{,str}() cannot access
> > userspace addresses. That causes e.g. command-line parameters to not
> > appear when snooping execve using bpf.
>
> Again, this really feels like a new feature, not a regression or bugfix
> at all. And in looking at these patches, that feeling really gets
> stronger.
>
> > This patch series takes the upstream solution. This solution also
> > changes user API in the following ways:
> > * Add probe_read_{user, kernel}{,_str} bpf helpers
> > * Add skb_output helper to the enum only (calling it not supported)
> > * Add support for %pks, %pus specifiers
> >
> > An alternative fix only takes the required logic to existing API without
> > adding new API, was suggested here:
> > https://www.spinics.net/lists/stable/msg454945.html
> >
> > Another option is to only take patches [1-4] of this patchset, and add
> > on top of them commit 8d92db5c04d1 ("bpf: rework the compat kernel probe
> > handling"). In that case, the last patch would require function renames
> > and conflict resolutions that were avoided in this patchset by pulling
> > patches [5-7].
>
> The other option is to move your system to a newer kernel release that
> has this new feature, right? :)
>
> What prevents you from doing that today? What bug is this solving that
> worked in previous kernel releases and was broken in 5.4.y?
And again, "feature parity across CPU architectures for the same
release" is nothing that Linux has EVER guaranteed...
thanks,
greg k-h
prev parent reply other threads:[~2021-04-24 14:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 13:05 [PATCH 0/8] Fix bpf: fix userspace access for bpf_probe_read{,str}() Zidenberg, Tsahi
2021-04-21 13:07 ` [PATCH 1/8] uaccess: Add strict non-pagefault kernel-space read, function Zidenberg, Tsahi
2021-04-21 13:08 ` bpf: Add probe_read_{user, kernel} and probe_read_{user,, kernel}_str helpers Zidenberg, Tsahi
2021-04-23 15:06 ` Greg KH
2021-04-21 13:09 ` [PATCH 3/8] bpf: Restrict bpf_probe_read{, str}() only to archs where, they work Zidenberg, Tsahi
2021-04-21 13:10 ` [PATCH 4/8] powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc, again Zidenberg, Tsahi
2021-04-21 13:11 ` [PATCH 5/8] bpf: Restrict bpf_trace_printk()'s %s usage and add %pks,, %pus specifier Zidenberg, Tsahi
2021-04-21 13:12 ` [PATCH 6/8] maccess: rename strncpy_from_unsafe_user to, strncpy_from_user_nofault Zidenberg, Tsahi
2021-04-21 13:13 ` [PATCH 7/8] maccess: rename strncpy_from_unsafe_strict to, strncpy_from_kernel_nofault Zidenberg, Tsahi
2021-04-21 13:14 ` [PATCH 8/8] bpf: rework the compat kernel probe handling Zidenberg, Tsahi
2021-04-21 13:15 ` [PATCH 2/8] bpf: Add probe_read_{user, kernel} and probe_read_{user,, kernel}_str helpers Zidenberg, Tsahi
2021-04-21 13:18 ` [PATCH 0/8] Fix bpf: fix userspace access for bpf_probe_read{,str}() Greg KH
2021-04-21 14:27 ` [PATCH 0/8] Fix bpf: fix userspace access for bpf_probe_read{, str}() Zidenberg, Tsahi
2021-04-23 15:08 ` [PATCH 0/8] Fix bpf: fix userspace access for bpf_probe_read{,str}() Greg KH
2021-04-24 14:47 ` 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=YIQvfapynnC9Od+l@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=tsahee@amazon.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.