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]
Date:   Sat, 6 Jul 2019 05:17:15 +0000
From:   Yonghong Song <yhs@...com>
To:     Andrii Nakryiko <andriin@...com>,
        "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix test_attach_probe map
 definition



On 7/5/19 9:44 PM, Andrii Nakryiko wrote:
> ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map
> defs") changed BTF-defined maps syntax, while independently merged
> 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") added new
> test using outdated syntax of maps. This patch fixes this test after
> corresponding patch sets were merged.
> 
> Fixes: ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map defs")
> Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests")
> Signed-off-by: Andrii Nakryiko <andriin@...com>

Acked-by: Yonghong Song <yhs@...com>

> ---
>   .../testing/selftests/bpf/progs/test_attach_probe.c | 13 +++++--------
>   1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/test_attach_probe.c b/tools/testing/selftests/bpf/progs/test_attach_probe.c
> index 7a7c5cd728c8..63a8dfef893b 100644
> --- a/tools/testing/selftests/bpf/progs/test_attach_probe.c
> +++ b/tools/testing/selftests/bpf/progs/test_attach_probe.c
> @@ -6,14 +6,11 @@
>   #include "bpf_helpers.h"
>   
>   struct {
> -	int type;
> -	int max_entries;
> -	int *key;
> -	int *value;
> -} results_map SEC(".maps") = {
> -	.type = BPF_MAP_TYPE_ARRAY,
> -	.max_entries = 4,
> -};
> +	__uint(type, BPF_MAP_TYPE_ARRAY);
> +	__uint(max_entries, 4);
> +	__type(key, int);
> +	__type(value, int);
> +} results_map SEC(".maps");
>   
>   SEC("kprobe/sys_nanosleep")
>   int handle_sys_nanosleep_entry(struct pt_regs *ctx)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ