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]
Message-Id: <d47c35dd-9c52-48e7-a00d-135572f11fbb@app.fastmail.com>
Date: Tue, 11 Feb 2025 09:08:58 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Ian Rogers" <irogers@...gle.com>,
 "Peter Zijlstra" <peterz@...radead.org>,
 "Ingo Molnar" <mingo@...hat.com>,
 "Arnaldo Carvalho de Melo" <acme@...nel.org>,
 "Namhyung Kim" <namhyung@...nel.org>,
 "Mark Rutland" <mark.rutland@....com>,
 "Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
 "Jiri Olsa" <jolsa@...nel.org>,
 "Adrian Hunter" <adrian.hunter@...el.com>,
 "Kan Liang" <kan.liang@...ux.intel.com>,
 "John Garry" <john.g.garry@...cle.com>, "Will Deacon" <will@...nel.org>,
 "James Clark" <james.clark@...aro.org>,
 "Mike Leach" <mike.leach@...aro.org>, "Leo Yan" <leo.yan@...ux.dev>,
 guoren <guoren@...nel.org>, "Paul Walmsley" <paul.walmsley@...ive.com>,
 "Palmer Dabbelt" <palmer@...belt.com>,
 "Albert Ou" <aou@...s.berkeley.edu>,
 "Charlie Jenkins" <charlie@...osinc.com>,
 "Bibo Mao" <maobibo@...ngson.cn>, "Huacai Chen" <chenhuacai@...nel.org>,
 "Catalin Marinas" <catalin.marinas@....com>,
 "Jiri Slaby" <jirislaby@...nel.org>,
 Björn Töpel <bjorn@...osinc.com>,
 "Howard Chu" <howardchu95@...il.com>, linux-kernel@...r.kernel.org,
 linux-perf-users@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
 linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v2 5/7] perf trace beauty: Add syscalltbl.sh generating all system
 call tables

On Mon, Feb 10, 2025, at 17:51, Ian Rogers wrote:

> +# Each line of the syscall table should have the following format:
> +#
> +# NR ABI NAME [NATIVE] [COMPAT]
> +#
> +# NR       syscall number
> +# ABI      ABI name
> +# NAME     syscall name
> +# NATIVE   native entry point (optional)
> +# COMPAT   compat entry point (optional)

On x86, there is now a sixth optional field.

> +#if defined(ALL_SYSCALLTBL) || defined(__arm__) || defined(__aarch64__)
> +EOF
> +build_tables "$tools_dir/perf/arch/arm/entry/syscalls/syscall.tbl" 
> "$outfile" common,32,oabi EM_ARM
> +build_tables 

The oabi syscalls probably shouldn't be part of the default set here.
Technically these are two separate ABIs, though EABI is a subset of
OABI for the most most part. Some of the calling conventions are
also different.

> "$tools_dir/perf/arch/arm64/entry/syscalls/syscall_64.tbl" "$outfile" 
> common,64,renameat,rlimit,memfd_secret EM_AARCH64
> +cat >> "$outfile" <<EOF
> +#endif // defined(ALL_SYSCALLTBL) || defined(__arm__) || 
> defined(__aarch64__)

Hardcoding the set of ABIs in the middle of the script seems
too fragile to me, I'm worried that these get out of sync quickly.

> +#if defined(ALL_SYSCALLTBL) || defined(__mips__)
> +EOF
> +build_tables 
> "$tools_dir/perf/arch/mips/entry/syscalls/syscall_n64.tbl" "$outfile" 
> common,64,n64 EM_MIPS
> +cat >> "$outfile" <<EOF
> +#endif // defined(ALL_SYSCALLTBL) || defined(__mips__)

What about n32/o32? The syscall tables are completely different here.

> +#if defined(ALL_SYSCALLTBL) || defined(__powerpc__) || 
> defined(__powerpc64__)
> +EOF
> +build_tables "$tools_dir/perf/arch/powerpc/entry/syscalls/syscall.tbl" 
> "$outfile" common,32,nospu EM_PPC
> +build_tables "$tools_dir/perf/arch/powerpc/entry/syscalls/syscall.tbl" 
> "$outfile" common,64,nospu EM_PPC64
> +cat >> "$outfile" <<EOF
> +#endif // defined(ALL_SYSCALLTBL) || defined(__powerpc__) || 
> defined(__powerpc64__)

This skips the SPU table, but I think that's fine.

> +EOF
> +build_tables "$tools_dir/perf/arch/s390/entry/syscalls/syscall.tbl" 
> "$outfile" common,64,renameat,rlimit,memfd_secret EM_S390
> +cat >> "$outfile" <<EOF
> +#endif // defined(ALL_SYSCALLTBL) || defined(__s390x__)

This skips the 32-bit table, though I think that one is already
planned to be discontinued in the future.

> +#if defined(ALL_SYSCALLTBL) || defined(__i386__) || defined(__x86_64__)
> +EOF
> +build_tables "$tools_dir/perf/arch/x86/entry/syscalls/syscall_32.tbl" 
> "$outfile" common,32,i386 EM_386
> +build_tables "$tools_dir/perf/arch/x86/entry/syscalls/syscall_64.tbl" 
> "$outfile" common,64 EM_X86_64
> +cat >> "$outfile" <<EOF
> +#endif // defined(ALL_SYSCALLTBL) || defined(__i386__) || 
> defined(__x86_64__)

This misses the x32 table.

   Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ