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: <10a643ba-cafe-411e-855e-d93d8144f470@app.fastmail.com>
Date: Wed, 07 Aug 2024 09:11:01 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Namhyung Kim" <namhyung@...nel.org>,
 "Arnaldo Carvalho de Melo" <acme@...nel.org>
Cc: "Ian Rogers" <irogers@...gle.com>, "Jiri Olsa" <jolsa@...nel.org>,
 "Adrian Hunter" <adrian.hunter@...el.com>,
 "Peter Zijlstra" <peterz@...radead.org>, "Ingo Molnar" <mingo@...nel.org>,
 LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org,
 "Linus Torvalds" <torvalds@...ux-foundation.org>,
 Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH 06/10] tools/include: Sync uapi/asm-generic/unistd.h with the
 kernel sources

On Wed, Aug 7, 2024, at 00:50, Namhyung Kim wrote:
> And arch syscall tables to pick up changes from:
>
>   b1e31c134a8a powerpc: restore some missing spu syscalls
>   d3882564a77c syscalls: fix compat_sys_io_pgetevents_time64 usage
>   54233a425403 uretprobe: change syscall number, again
>   63ded110979b uprobe: Change uretprobe syscall scope and number
>   9142be9e6443 x86/syscall: Mark exit[_group] syscall handlers __noreturn
>   9aae1baa1c5d x86, arm: Add missing license tag to syscall tables files
>   5c28424e9a34 syscalls: Fix to add sys_uretprobe to syscall.tbl
>   190fec72df4a uprobe: Wire up uretprobe system call
>
> This should be used to beautify syscall arguments and it addresses
> these tools/perf build warnings:
>
>   Warning: Kernel ABI header differences:
>   diff -u tools/arch/arm64/include/uapi/asm/unistd.h 
> arch/arm64/include/uapi/asm/unistd.h
>   diff -u tools/include/uapi/asm-generic/unistd.h 
> include/uapi/asm-generic/unistd.h
>   diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 
> arch/x86/entry/syscalls/syscall_64.tbl
>   diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl 
> arch/powerpc/kernel/syscalls/syscall.tbl
>   diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl 
> arch/s390/kernel/syscalls/syscall.tbl
>
> Please see tools/include/uapi/README for details (it's in the first patch
> of this series).
>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: linux-arch@...r.kernel.org
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/arch/arm64/include/uapi/asm/unistd.h    | 24 +------------------
>  tools/include/uapi/asm-generic/unistd.h       |  2 +-
>  .../arch/powerpc/entry/syscalls/syscall.tbl   |  6 ++++-
>  .../perf/arch/s390/entry/syscalls/syscall.tbl |  2 +-
>  .../arch/x86/entry/syscalls/syscall_64.tbl    |  8 ++++---
>  5 files changed, 13 insertions(+), 29 deletions(-)
>
> diff --git a/tools/arch/arm64/include/uapi/asm/unistd.h 
> b/tools/arch/arm64/include/uapi/asm/unistd.h
> index 9306726337fe..df36f23876e8 100644
> --- a/tools/arch/arm64/include/uapi/asm/unistd.h
> +++ b/tools/arch/arm64/include/uapi/asm/unistd.h
> -
> -#define __ARCH_WANT_RENAMEAT
> -#define __ARCH_WANT_NEW_STAT
> -#define __ARCH_WANT_SET_GET_RLIMIT
> -#define __ARCH_WANT_TIME32_SYSCALLS
> -#define __ARCH_WANT_MEMFD_SECRET
> -
> -#include <asm-generic/unistd.h>
> +#include <asm/unistd_64.h>

This part won't work by itself, since you don't pick up
the generated asm/unistd_64.h header but keep the old
asm-generic/unistd.h header. Both have the same contents,
so the easy way to do this is to just keep the existing
version of the arm64 header for 6.11 and add a script to
generate it in 6.12 the way we do for x86, using an
architecture-independent script.

> @@ -68,7 +69,7 @@
>  57	common	fork			sys_fork
>  58	common	vfork			sys_vfork
>  59	64	execve			sys_execve
> -60	common	exit			sys_exit
> +60	common	exit			sys_exit			-			noreturn
>  61	common	wait4			sys_wait4
>  62	common	kill			sys_kill
>  63	common	uname			sys_newuname

Have you checked if this works correctly with the
existing tools/perf/arch/x86/entry/syscalls/syscalltbl.sh?

Since not just table file contents but also the file format
changed here, there is a good chance that the output
is no longer what we need.

Unfortunately, the format on x86 is now incompatible with
the one on s390. I have a patch to change s390 in the future
so we can use a single script for all of them.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ