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]
Date:   Thu, 25 Jan 2018 18:09:24 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Mickaël Salaün <mic@...ikod.net>
Cc:     linux-kernel@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v1] bpf: Use the IS_FD_ARRAY() macro in
 map_update_elem()

On Fri, Jan 26, 2018 at 12:54:02AM +0100, Mickaël Salaün wrote:
> Make the code more readable.
> 
> Signed-off-by: Mickaël Salaün <mic@...ikod.net>
> Cc: Alexei Starovoitov <ast@...nel.org>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> ---
>  kernel/bpf/syscall.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 5bdb0cc84ad2..e24aa3241387 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -709,10 +709,7 @@ static int map_update_elem(union bpf_attr *attr)
>  		err = bpf_percpu_hash_update(map, key, value, attr->flags);
>  	} else if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) {
>  		err = bpf_percpu_array_update(map, key, value, attr->flags);
> -	} else if (map->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY ||
> -		   map->map_type == BPF_MAP_TYPE_PROG_ARRAY ||
> -		   map->map_type == BPF_MAP_TYPE_CGROUP_ARRAY ||
> -		   map->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS) {
> +	} else if (IS_FD_ARRAY(map)) {

Applied to bpf-next, thank you Mickael.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ