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:   Wed, 3 Jan 2018 15:33:07 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     "Wangnan (F)" <wangnan0@...wei.com>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: perf test BPF failing on 4.15.0-rc6

Em Wed, Jan 03, 2018 at 03:27:01PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Continuing investigation...
> 
> After applying the fallback patch to allow new tools to work with older
> kernels:
> 
> [root@...icio ~]# perf test bpf
> 39: BPF filter                                            :
> 39.1: Basic BPF filtering                                 : Ok
> 39.2: BPF pinning                                         : Ok
> 39.3: BPF prologue generation                             : Ok
> 39.4: BPF relocation checker                              : Ok
> [root@...icio ~]# uname -a
> Linux felicio.ghostprotocols.net 4.13.0-rc7+ #1 SMP Mon Sep 11 13:56:18 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
> [root@...icio ~]# rpm -q glibc
> glibc-2.17-157.el7_3.2.x86_64
> [root@...icio ~]#
> 
> After applying the patch below I get to, which is what I am trying to
> fix now:
> 
> [root@...et ~]# perf test bpf
> 39: BPF filter                                            :
> 39.1: Basic BPF filtering                                 : Ok
> 39.2: BPF pinning                                         : Ok
> 39.3: BPF prologue generation                             : FAILED!
> 39.4: BPF relocation checker                              : Skip
> [root@...et ~]# 

Update the patch to the one at the end of this message to make it work
with older glibcs, so that we ask for epoll_pwait() and hook into that
as well().

Now checking why 39.3 fails...

- Arnaldo

diff --git a/tools/perf/tests/bpf-script-example.c b/tools/perf/tests/bpf-script-example.c
index 268e5f8e4aa2..d1e67e271675 100644
--- a/tools/perf/tests/bpf-script-example.c
+++ b/tools/perf/tests/bpf-script-example.c
@@ -31,7 +31,7 @@ struct bpf_map_def SEC("maps") flip_table = {
 	.max_entries = 1,
 };
 
-SEC("func=SyS_epoll_wait")
+SEC("func=SyS_epoll_pwait")
 int bpf_func__SyS_epoll_wait(void *ctx)
 {
 	int ind =0;
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index 0512f1b5bfdb..7c04e2d5b60b 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -25,7 +25,7 @@ static int epoll_wait_loop(void)
 
 	/* Should fail NR_ITERS times */
 	for (i = 0; i < NR_ITERS; i++)
-		epoll_wait(-(i + 1), NULL, 0, 0);
+		epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
 	return 0;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ