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: <20191104082721.2c4304e8@cakuba.netronome.com>
Date:   Mon, 4 Nov 2019 08:27:21 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, bpf@...r.kernel.org,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH net-next] bpf: re-fix skip write only files in debugfs

On Mon,  4 Nov 2019 15:27:02 +0100, Daniel Borkmann wrote:
> Commit 5bc60de50dfe ("selftests: bpf: Don't try to read files without
> read permission") got reverted as the fix was not working as expected
> and real fix came in via 8101e069418d ("selftests: bpf: Skip write
> only files in debugfs"). When bpf-next got merged into net-next, the
> test_offload.py had a small conflict. Fix the resolution in ae8a76fb8b5d
> iby not reintroducing 5bc60de50dfe again.
> 
> Fixes: ae8a76fb8b5d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Cc: Alexei Starovoitov <ast@...nel.org>

Ayayay :(

Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>

>  [
>    Hey Jakub, please take a look at the below merge fix ... still trying
>    to figure out why the netdev doesn't appear on my test node when I
>    wanted to run the test script, but seems independent of the fix.
> 
>    [...]
>    [ 1901.270493] netdevsim: probe of netdevsim4 failed with error -17
>    [...]
> 
>    # ./test_offload.py
>    Test destruction of generic XDP...
>    Traceback (most recent call last):
>     File "./test_offload.py", line 800, in <module>
>      simdev = NetdevSimDev()
>     File "./test_offload.py", line 355, in __init__
>      self.wait_for_netdevs(port_count)
>     File "./test_offload.py", line 390, in wait_for_netdevs
>      raise Exception("netdevices did not appear within timeout")
>    Exception: netdevices did not appear within timeout
>  ]
> 
>  tools/testing/selftests/bpf/test_offload.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
> index fc8a4319c1b2..1afa22c88e42 100755
> --- a/tools/testing/selftests/bpf/test_offload.py
> +++ b/tools/testing/selftests/bpf/test_offload.py
> @@ -314,7 +314,10 @@ def bpftool_prog_load(sample, file_name, maps=[], prog_type="xdp", dev=None,
>                  continue
>  
>              p = os.path.join(path, f)
> -            if os.path.isfile(p) and os.access(p, os.R_OK):
> +            if not os.stat(p).st_mode & stat.S_IRUSR:
> +                continue
> +
> +            if os.path.isfile(p):
>                  _, out = cmd('cat %s/%s' % (path, f))
>                  dfs[f] = out.strip()
>              elif os.path.isdir(p):

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ