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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 09 Feb 2017 22:05:39 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Mickaël Salaün <mic@...ikod.net>,
        linux-kernel@...r.kernel.org
CC:     Alexei Starovoitov <ast@...com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        "David S . Miller" <davem@...emloft.net>,
        Wang Nan <wangnan0@...wei.com>, netdev@...r.kernel.org,
        Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH net-next v4 04/11] bpf: Use bpf_load_program() from the
 library

On 02/08/2017 09:49 PM, Mickaël Salaün wrote:
> Replace bpf_prog_load() with bpf_load_program() calls.
>
> Signed-off-by: Mickaël Salaün <mic@...ikod.net>
> Cc: Alexei Starovoitov <ast@...com>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Shuah Khan <shuah@...nel.org>
[...]
> diff --git a/tools/testing/selftests/bpf/test_tag.c b/tools/testing/selftests/bpf/test_tag.c
> index 5f7c602f47d1..b77dc4b03e77 100644
> --- a/tools/testing/selftests/bpf/test_tag.c
> +++ b/tools/testing/selftests/bpf/test_tag.c
> @@ -16,6 +16,8 @@
>   #include <linux/bpf.h>
>   #include <linux/if_alg.h>
>
> +#include <bpf/bpf.h>
> +
>   #include "../../../include/linux/filter.h"
>
>   #include "bpf_sys.h"
> @@ -55,8 +57,8 @@ static int bpf_try_load_prog(int insns, int fd_map,
>   	int fd_prog;
>
>   	bpf_filler(insns, fd_map);
> -	fd_prog = bpf_prog_load(BPF_PROG_TYPE_SCHED_CLS, prog, insns *
> -				sizeof(struct bpf_insn), "", NULL, 0);
> +	fd_prog = bpf_load_program(BPF_PROG_TYPE_SCHED_CLS, prog, insns, "", 0,
> +			NULL, 0);

Went over the set and generally looks good. Please make sure though,
like in above case that you properly fix aligning next line to the
opening '('. I've noticed this multiple times in this and in the next
patch at least. Please double check the rest of your series as well.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ