X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Fentry.S;h=e8c0bbf4d000353c176b55d4da7c36b628b19b65;hb=5d54e69c68c05b162a56f9914cae72afd7e6f40a;hp=bf99b4a92f20864313c7d79211a5d5a6db68a7ce;hpb=64e47488c913ac704d465a6af86a26786d1412a5;p=~andy%2Flinux diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S index bf99b4a92f2..e8c0bbf4d00 100644 --- a/arch/ppc64/kernel/entry.S +++ b/arch/ppc64/kernel/entry.S @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_PPC_ISERIES @@ -276,12 +276,22 @@ _GLOBAL(ppc64_rt_sigsuspend) _GLOBAL(ppc32_rt_sigsuspend) bl .save_nvgprs bl .sys32_rt_sigsuspend - /* If sigsuspend() returns zero, we are going into a signal handler */ 70: cmpdi 0,r3,0 - beq .ret_from_except - /* If it returned -EINTR, we need to return via syscall_exit to set + /* If it returned an error, we need to return via syscall_exit to set the SO bit in cr0 and potentially stop for ptrace. */ - b syscall_exit + bne syscall_exit + /* If sigsuspend() returns zero, we are going into a signal handler. We + may need to call audit_syscall_exit() to mark the exit from sigsuspend() */ +#ifdef CONFIG_AUDIT + ld r3,PACACURRENT(r13) + ld r4,AUDITCONTEXT(r3) + cmpdi 0,r4,0 + beq .ret_from_except /* No audit_context: Leave immediately. */ + li r4, 2 /* AUDITSC_FAILURE */ + li r5,-4 /* It's always -EINTR */ + bl .audit_syscall_exit +#endif + b .ret_from_except _GLOBAL(ppc_fork) bl .save_nvgprs