kernel:handle improper svc calls gracefully.
Change-Id: Id0f694dd2a8c5981900601fcdb2112ee266d0d76
This commit is contained in:
parent
b18224051a
commit
d47f512a13
1 changed files with 6 additions and 2 deletions
|
@ -192,7 +192,11 @@ ENTRY(svc_entry)
|
||||||
beq kernel_call_entry
|
beq kernel_call_entry
|
||||||
cmp r3, #IPCVEC
|
cmp r3, #IPCVEC
|
||||||
beq ipc_entry
|
beq ipc_entry
|
||||||
b invalid_svc
|
|
||||||
|
/* return -1 to the current process as an invalid SWI was called .*/
|
||||||
|
mov r0, #-1
|
||||||
|
str r0, [fp, #REG0]
|
||||||
|
b _C_LABEL(switch_to_user)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* kernel call is only from a process to kernel
|
* kernel call is only from a process to kernel
|
||||||
|
@ -244,7 +248,7 @@ ENTRY(ipc_entry)
|
||||||
b _C_LABEL(switch_to_user)
|
b _C_LABEL(switch_to_user)
|
||||||
|
|
||||||
ENTRY(invalid_svc)
|
ENTRY(invalid_svc)
|
||||||
b .
|
b .
|
||||||
|
|
||||||
ENTRY(restore_user_context)
|
ENTRY(restore_user_context)
|
||||||
/* sp holds the proc ptr */
|
/* sp holds the proc ptr */
|
||||||
|
|
Loading…
Reference in a new issue