[PATCH v6 2/6] syscall.h: add syscall_set_arguments()

Maciej W. Rozycki macro at orcam.me.uk
Wed Feb 19 19:16:04 UTC 2025


On Wed, 19 Feb 2025, Dmitry V. Levin wrote:

> > -- given MIPS syscall_set_nr() implementation in 3/6 this conditional is 
> > supposed to never be true.  Should it be BUG_ON() or discarded entirely?
> 
> I agree it should be discarded: given that the syscall number read from
> regs[2] after syscall_trace_enter() invocation is not treated in any
> special way with regards to __NR_syscall, it would be incorrect to do
> it here either.  In fact, user space is allowed to set regs[2] to
> __NR_syscall, even though it's pointless, but it's definitely not a
> BUG_ON() situation.

 Right, good point, the conditional indeed can do harm even.  Thanks for 
double-checking.

  Maciej


More information about the Strace-devel mailing list