[PATCH v6 3/6] syscall.h: introduce syscall_set_nr()

Dmitry V. Levin ldv at strace.io
Wed Feb 19 19:30:07 UTC 2025


On Wed, Feb 19, 2025 at 07:20:33PM +0000, Maciej W. Rozycki wrote:
> On Wed, 19 Feb 2025, Dmitry V. Levin wrote:
[...]
> > Would you be OK with the following wording:
> > 	/*
> > 	 * New syscall number has to be assigned to regs[2] because it is
> > 	 * loaded from there unconditionally after syscall_trace_enter()
> > 	 * invocation.
> 
>  May I suggest "[...] after return from syscall_trace_enter() invocation." 
> instead?  Minor reformatting might be required for better visual alignment 
> though.

Like this:
	/*
	 * New syscall number has to be assigned to regs[2] because
	 * it is loaded from there unconditionally after return from
	 * syscall_trace_enter() invocation.
	 *
	 * Consequently, if the syscall was indirect and nr != __NR_syscall,
	 * then after this assignment the syscall will cease to be indirect.
	 */
?

-- 
ldv


More information about the Strace-devel mailing list