Commit 3bb457af authored by Kyle McMartin's avatar Kyle McMartin Committed by Kyle McMartin

[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls

The bug was that we were comparing __NR_syscalls to be greater or equal
to the syscall number stored in %r20. __NR_syscalls is one greater than
the last syscall though, so we're loading one entry beyond the end of the
syscall table, and trying to jump to it.

Fix this by only checking that we're greater, alternatively, we could
have compared to (__NR_Linux_syscalls - 1)
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent cc650a7a
...@@ -198,7 +198,7 @@ linux_gateway_entry: ...@@ -198,7 +198,7 @@ linux_gateway_entry:
ldil L%sys_call_table, %r1 ldil L%sys_call_table, %r1
ldo R%sys_call_table(%r1), %r19 ldo R%sys_call_table(%r1), %r19
#endif #endif
comiclr,>>= __NR_Linux_syscalls, %r20, %r0 comiclr,>> __NR_Linux_syscalls, %r20, %r0
b,n .Lsyscall_nosys b,n .Lsyscall_nosys
LDREGX %r20(%r19), %r19 LDREGX %r20(%r19), %r19
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment