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-next>] [day] [month] [year] [list]
Message-ID: <20250129132148.301937-1-npiggin@gmail.com>
Date: Wed, 29 Jan 2025 23:21:41 +1000
From: Nicholas Piggin <npiggin@...il.com>
To: "Dmitry V. Levin" <ldv@...ace.io>
Cc: Nicholas Piggin <npiggin@...il.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Eugene Syromyatnikov <evgsyr@...il.com>,
	Mike Frysinger <vapier@...too.org>,
	Renzo Davoli <renzo@...unibo.it>,
	Davide Berardi <berardi.dav@...il.com>,
	strace-devel@...ts.strace.io,
	Madhavan Srinivasan <maddy@...ux.ibm.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	linuxppc-dev@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org
Subject: [RFC PATCH 0/2] powerpc: change syscall error return scheme

Hi,

I've been toying with the seccomp vs syscall return value problems, and
wonder if something like this approach could give us a simpler alternative.
Basically all the core code uses -errno return value, then we convert it
to the powerpc convention at the last minute when returning.

This seems to pass the seccomp_bpf test cases when applied with the set
syscall info ptrace patches

https://lore.kernel.org/lkml/20250113171054.GA589@strace.io/

With patch 1 of that series reverted.

One concern is working out exact details of what tracers can see and
trying to ensure it doesn't break some corner case.

This could possibly be done for the other weird archs too, if it works
out for powerpc

Thanks,
Nick

Nicholas Piggin (2):
  powerpc/signal: Clean up pt_regs access
  powerpc/syscall: rework syscall return value handling

 arch/powerpc/include/asm/ptrace.h             | 13 +---
 arch/powerpc/include/asm/syscall.h            | 31 +--------
 arch/powerpc/kernel/interrupt.c               | 16 +++--
 arch/powerpc/kernel/signal.c                  | 67 ++++++++++---------
 arch/powerpc/kernel/signal_64.c               |  5 +-
 tools/testing/selftests/seccomp/seccomp_bpf.c | 16 +++++
 6 files changed, 69 insertions(+), 79 deletions(-)

-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ