arch: arm: aarch32: userspace: fix syscall ID validation
We need an unsigned comparison when evaluating whether the supplied syscall ID is lower than the syscall ID limit. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
fe6107f2b3
commit
502b67ceba
1 changed files with 4 additions and 1 deletions
|
@ -508,7 +508,10 @@ _do_syscall:
|
||||||
ldr ip, =K_SYSCALL_LIMIT
|
ldr ip, =K_SYSCALL_LIMIT
|
||||||
cmp r6, ip
|
cmp r6, ip
|
||||||
#endif
|
#endif
|
||||||
blt valid_syscall_id
|
/* The supplied syscall_id must be lower than the limit
|
||||||
|
* (Requires unsigned integer comparison)
|
||||||
|
*/
|
||||||
|
blo valid_syscall_id
|
||||||
|
|
||||||
/* bad syscall id. Set arg1 to bad id and set call_id to SYSCALL_BAD */
|
/* bad syscall id. Set arg1 to bad id and set call_id to SYSCALL_BAD */
|
||||||
str r6, [r0]
|
str r6, [r0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue