From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Kees Cook <keescook@chromium.org>
Cc: Quentin Monnet <quentin.monnet@netronome.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Network Development <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: nfp: bpf: perf event output helpers support
Date: Thu, 7 Jun 2018 09:33:40 -0700 [thread overview]
Message-ID: <20180607093340.1742a5d1@cakuba.netronome.com> (raw)
In-Reply-To: <CAGXu5jJq774LZY1xUCKxG3Z4MkJ_JBJP7veB5gUCy4meb_PtSA@mail.gmail.com>
On Wed, 6 Jun 2018 22:15:04 -0700, Kees Cook wrote:
> > + rcu_read_lock();
> > + if (!rhashtable_lookup_fast(&bpf->maps_neutral, &map,
> > + nfp_bpf_maps_neutral_params)) {
> > + rcu_read_unlock();
> > + pr_warn("perf event: dest map pointer %px not recognized, dropping event\n",
> > + map);
>
> Please don't use %px on kernel pointers unless you absolutely have
> to[1]. It seems like this value wouldn't be actionable here, so likely
> it's best to just remove its use entirely.
We're using kernel pointer as an opaque handle when communicating with
the device. We need the actual value to correlate things. Maybe I used
the %px slightly out of spite there, because I forgot %p is now useless
and wasted half an hour on debugging an endian issue :S
This message can only really trigger when root loads a specific BPF map
onto the device and FW is buggy. Can I fix it in -next? I'm making
changes to this part of the code anyway.
next prev parent reply other threads:[~2018-06-07 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 5:15 nfp: bpf: perf event output helpers support Kees Cook
2018-06-07 16:33 ` Jakub Kicinski [this message]
2018-06-07 19:13 ` Kees Cook
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=20180607093340.1742a5d1@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=daniel@iogearbox.net \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox