lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180607093340.1742a5d1@cakuba.netronome.com>
Date:   Thu, 7 Jun 2018 09:33:40 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Quentin Monnet <quentin.monnet@...ronome.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Network Development <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: nfp: bpf: perf event output helpers support

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ