Insure seccomp is called on syscall
David DSH [Tue, 22 Dec 2015 04:43:01 +0000 (20:43 -0800)]
Bug 200147146

Change-Id: Ieef34724948077fd834f9eabc719806f2c4770be
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/925869
GVS: Gerrit_Virtual_Submit
Reviewed-by: Roopa Ranganathan <rranganathan@nvidia.com>
Tested-by: Roopa Ranganathan <rranganathan@nvidia.com>

arch/arm64/kernel/entry.S

index 36ceb45..13cb2fc 100644 (file)
@@ -632,8 +632,10 @@ el0_svc_naked:                                     // compat entry point
        enable_dbg_irq
 
        get_thread_info tsk
-       ldr     x16, [tsk, #TI_FLAGS]           // check for syscall tracing
-       tbnz    x16, #TIF_SYSCALL_TRACE, __sys_trace // are we tracing syscalls?
+       ldr     x16, [tsk, #TI_FLAGS]           // check for syscall hooks
+       tst     x16, #_TIF_SYSCALL_WORK
+       b.ne    __sys_trace
+
        cmp     scno, sc_nr                     // check upper syscall limit
        b.hs    ni_sys
        ldr     x16, [stbl, scno, lsl #3]       // address in the syscall table