Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Do not invoke audit_syscall_* functions if !CONFIG_AUDIT_SYSCALL

This is a temporary patch to be able to compile the kernel in linux-next
where the audit_syscall_* API has been changed. To be reverted once the
proper arm64 fix can be applied.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

+4
+4
arch/arm64/kernel/ptrace.c
··· 1115 1115 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) 1116 1116 trace_sys_enter(regs, regs->syscallno); 1117 1117 1118 + #ifdef CONFIG_AUDITSYSCALL 1118 1119 audit_syscall_entry(syscall_get_arch(), regs->syscallno, 1119 1120 regs->orig_x0, regs->regs[1], regs->regs[2], regs->regs[3]); 1121 + #endif 1120 1122 1121 1123 return regs->syscallno; 1122 1124 } 1123 1125 1124 1126 asmlinkage void syscall_trace_exit(struct pt_regs *regs) 1125 1127 { 1128 + #ifdef CONFIG_AUDITSYSCALL 1126 1129 audit_syscall_exit(regs); 1130 + #endif 1127 1131 1128 1132 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) 1129 1133 trace_sys_exit(regs, regs_return_value(regs));