Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc7d479f authored by Jan Beulich's avatar Jan Beulich Committed by Andi Kleen
Browse files

[PATCH] x86-64: Fix ENOSYS in system call tracing



This patch:

- out of range system calls failing to return -ENOSYS under
  system call tracing

[AK: split out from another patch by Jan as separate bugfix]

Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 26fd5e08
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -315,6 +315,8 @@ tracesys:
	LOAD_ARGS ARGOFFSET  /* reload args from stack in case ptrace changed it */
	LOAD_ARGS ARGOFFSET  /* reload args from stack in case ptrace changed it */
	RESTORE_REST
	RESTORE_REST
	cmpq $__NR_syscall_max,%rax
	cmpq $__NR_syscall_max,%rax
	movq $-ENOSYS,%rcx
	cmova %rcx,%rax
	ja  1f
	ja  1f
	movq %r10,%rcx	/* fixup for C */
	movq %r10,%rcx	/* fixup for C */
	call *sys_call_table(,%rax,8)
	call *sys_call_table(,%rax,8)