From: Denys Vlasenko Date: Wed, 25 Mar 2015 17:18:15 +0000 (+0100) Subject: x86/asm/entry/64: Use smaller instructions X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=47eb582e702880c302036d17341c7ea1a7dc2a53;p=linux-beck.git x86/asm/entry/64: Use smaller instructions The $AUDIT_ARCH_X86_64 parameter to syscall_trace_enter_phase1/2 is a 32-bit constant, loading it with 32-bit MOV produces 5-byte insn instead of 10-byte MOVABS one. Signed-off-by: Denys Vlasenko Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Steven Rostedt Cc: Will Drewry Link: http://lkml.kernel.org/r/1427303896-24023-3-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 9988c4b2de33..f85d2ccec6d2 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -305,7 +305,7 @@ system_call_fastpath: /* Do syscall entry tracing */ tracesys: movq %rsp, %rdi - movq $AUDIT_ARCH_X86_64, %rsi + movl $AUDIT_ARCH_X86_64, %esi call syscall_trace_enter_phase1 test %rax, %rax jnz tracesys_phase2 /* if needed, run the slow path */ @@ -316,7 +316,7 @@ tracesys: tracesys_phase2: SAVE_EXTRA_REGS movq %rsp, %rdi - movq $AUDIT_ARCH_X86_64, %rsi + movl $AUDIT_ARCH_X86_64, %esi movq %rax,%rdx call syscall_trace_enter_phase2