On Fri, Jul 03 2026 at 09:53, Michal Suchánek wrote:
On Thu, Jul 02, 2026 at 10:45:54PM +0200, Thomas Gleixner wrote:
quoted
quoted
When the syscall number was -1 to start with it's not possible to
determine if the syscall was fileterd from the return value. s390
returns the filtered state in a flag it sets on the regs structure,
avoiding this problem.
What needs to determine whether the syscall was filtered or not?
The code that executes syscall_enter_from_user_mode() needs to determine
that.
After syscall_enter_from_user_mode() returns the syscall needs to be
executed or skipped.
'Executing' an invalid syscall boils down to setting the return value to
-ENOSYS.
But if the syscall number returned is -1 was the syscall filtered and
the return value set by syscall_enter_from_user_mode() or should it be
set by the caller to -ENOSYS?
See the explanation I gave to Peter. It's conclusive, but admittedly not
intuitive.
The fact, that s390 decided to have the syscall number and the return
value in the same register is a different problem, but as I pointed out
to Sven it could have been solved completely without that flag.
Thanks,
tglx