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>] [day] [month] [year] [list]
Message-ID: <B0F77B6E-D6B4-4658-B0CC-F566A208848D@fb.com>
Date: Tue, 15 Oct 2024 23:20:52 +0000
From: Song Liu <songliubraving@...a.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC: Song Liu <songliubraving@...a.com>,
        Arnaldo Carvalho de Melo
	<acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Howard Chu
	<howardchu95@...il.com>,
        Andrea Righi <andrea.righi@...ux.dev>,
        Peter
 Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
        Mark Rutland
	<mark.rutland@....com>,
        Alexander Shishkin
	<alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>, Ian
 Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kan
 Liang <kan.liang@...ux.intel.com>,
        linux-perf-use.
	<linux-perf-users@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "james.clark@...aro.org" <james.clark@...aro.org>,
        Alan Maguire
	<alan.maguire@...cle.com>
Subject: Re: [PATCH v2 0/2] perf trace: Fix support for the new BPF feature in
 clang 12



> On Oct 15, 2024, at 4:01 PM, Arnaldo Carvalho de Melo <arnaldo.melo@...il.com> wrote:
> 
> Maybe a compiler barrier somewhere around those index operations?

Indeed, something like the following helped. 

Song

diff --git i/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c w/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
index b2f17cca014b..7b7947ca8996 100644
--- i/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
+++ w/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
@@ -477,6 +477,8 @@ static int augment_sys_enter(void *ctx, struct syscall_enter_args *args)
                                augmented = true;
                } else if (size < 0 && size >= -6) { /* buffer */
                        index = -(size + 1);
+                       barrier_var(index);
+                       index &= 7;
                        aug_size = args->args[index];

                        if (aug_size > TRACE_AUG_MAX_BUF)



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ