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] [day] [month] [year] [list]
Message-ID: <d7d1ceae-2c40-a194-4ae9-d43ceaee5ebe@iogearbox.net>
Date:   Fri, 27 Apr 2018 11:15:22 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Wang Sheng-Hui <shhuiw@...mail.com>, ast@...nel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH] [PATCH bpf-next] samples/bpf/bpf_load.c: remove redundant
 ret assignment in bpf_load_program()

On 04/25/2018 04:07 AM, Wang Sheng-Hui wrote:
> 2 redundant ret assignments removded:
> * 'ret = 1' before the logic 'if (data_maps)', and if any errors jump to
>   label 'done'. No 'ret = 1' needed before the error jump.
> * After the '/* load programs */' part, if everything goes well, then
>   the BPF code will be loaded and 'ret' set to 0 by load_and_attach().
>   If something goes wrong, 'ret' set to none-O, the redundant 'ret = 0'
>   after the for clause will make the error skipped.
>   For example, if some BPF code cannot provide supported program types
>   in ELF SEC("unknown"), the for clause will not call load_and_attach()
>   to load the BPF code. 1 should be returned to callees instead of 0.
> 
> Signed-off-by: Wang Sheng-Hui <shhuiw@...mail.com>

Applied yesterday to bpf-next (and now in net-next), thanks Nikita!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ