From: Renzo Davoli <renzo@cs.unibo.it>
To: "Michal Suchánek" <msuchanek@suse.de>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
Kees Cook <kees@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>, Thomas Gleixner <tglx@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>, "Dmitry V . Levin" <ldv@strace.io>,
Alexey Gladkov <legion@kernel.org>,
Eugene Syromyatnikov <evgsyr@gmail.com>,
Davide Berardi <berardi.dav@gmail.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
linux-kselftest@vger.kernel.org, strace-devel@lists.strace.io
Subject: Re: [PATCH v11 0/3] PTRACE_SET_SYSCALL_INFO: add support for seccomp syscall skipping
Date: Wed, 18 Nov 2026 15:11:26 +0100 [thread overview]
Message-ID: <av2yDgdBWfTxvZca@cs.unibo.it> (raw)
In-Reply-To: <av2pRG1JT9te8IiM@kunlun.suse.cz>
On Wed, Nov 18, 2026 at 02:33:56PM +0100, Michal Suchánek wrote:
> As I understand it the new s390 code resolves the problem by storing the
> syscall number outside of the registers. Then the return value can be
> set directly. It does not depend on using the generic entry but on the
> architecture adding storage for the syscall number in struct pt_regs,
> and implementing the code to determine where to get/set the syscall
> value depending on the syscall stage.
Right, thanks for the correction: what matters is a separate storage
for the syscall number on the architectures where it shares a register
with the return value, not the generic entry code.
> However, it seems that extending struct pt_regs breaks userspace ABI
> (probably because kernel refuses to transfer partial pt_regs to/fom
> userspace) which makes it unclear how the int_code that is used by this
> new code could be added to the s390 struct pt_regs in the first place.
On s390 int_code is not new: it has been in the kernel-only part of
struct pt_regs, after user_pt_regs, since aa33c8cbbae2 ("[S390] cleanup
trap handling"), and the user ABI (s390_regs, user_regs_struct) does
not include it. Heiko's patch only redirects the ptrace accesses to
gpr2.
On architectures where struct pt_regs is itself the user ABI (e.g.
alpha), the storage does not need to be in pt_regs: MIPS already keeps
the syscall number in thread_info.
This is also why this series uses a per-task flag at the seccomp stop:
it does not depend on where the architecture stores the syscall
number.
Thanks,
renzo
next prev parent reply other threads:[~2026-11-18 14:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 18:19 [PATCH v11 0/3] PTRACE_SET_SYSCALL_INFO: add support for seccomp syscall skipping Renzo Davoli
2026-11-14 18:19 ` [PATCH v11 1/3] seccomp: let the tracer skip a syscall independently of its number Renzo Davoli
2026-11-14 18:40 ` sashiko-bot
2026-11-17 16:54 ` Oleg Nesterov
2026-11-14 18:19 ` [PATCH v11 2/3] ptrace: add PTRACE_SET_SYSCALL_INFO syscall skipping support Renzo Davoli
2026-11-14 18:44 ` sashiko-bot
2026-11-17 16:23 ` Oleg Nesterov
2026-11-14 18:19 ` [PATCH v11 3/3] selftests/ptrace: add a test case for PTRACE_SET_SYSCALL_INFO syscall skipping Renzo Davoli
2026-11-14 18:27 ` sashiko-bot
2026-11-18 11:42 ` [PATCH v11 0/3] PTRACE_SET_SYSCALL_INFO: add support for seccomp " Michal Suchánek
2026-11-18 13:07 ` Renzo Davoli
2026-11-18 13:33 ` Michal Suchánek
2026-11-18 14:11 ` Renzo Davoli [this message]
2026-11-18 15:47 ` Michal Suchánek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=av2yDgdBWfTxvZca@cs.unibo.it \
--to=renzo@cs.unibo.it \
--cc=akpm@linux-foundation.org \
--cc=berardi.dav@gmail.com \
--cc=evgsyr@gmail.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kees@kernel.org \
--cc=ldv@strace.io \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@amacapital.net \
--cc=maddy@linux.ibm.com \
--cc=msuchanek@suse.de \
--cc=oleg@redhat.com \
--cc=shuah@kernel.org \
--cc=strace-devel@lists.strace.io \
--cc=tglx@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=wad@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.