diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2014-03-04 10:38:06 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-09-23 16:21:28 -0400 |
commit | b4f0d3755c5e9cc86292d5fd78261903b4f23d4a (patch) | |
tree | 34cddc7f4fc142be54c487e95335d469eda10e5e /arch | |
parent | a17c8b54dc738c4fda31e8be0302cd131a04c19f (diff) |
audit: x86: drop arch from __audit_syscall_entry() interface
Since the arch is found locally in __audit_syscall_entry(), there is no need to
pass it in as a parameter. Delete it from the parameter list.
x86* was the only arch to call __audit_syscall_entry() directly and did so from
assembly code.
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-audit@redhat.com
Signed-off-by: Eric Paris <eparis@redhat.com>
---
As this patch relies on changes in the audit tree, I think it
appropriate to send it through my tree rather than the x86 tree.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/ia32/ia32entry.S | 12 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 11 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 11 |
3 files changed, 16 insertions, 18 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 4299eb05023c..f5bdd2881815 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -186,12 +186,12 @@ sysexit_from_sys_call: | |||
186 | 186 | ||
187 | #ifdef CONFIG_AUDITSYSCALL | 187 | #ifdef CONFIG_AUDITSYSCALL |
188 | .macro auditsys_entry_common | 188 | .macro auditsys_entry_common |
189 | movl %esi,%r9d /* 6th arg: 4th syscall arg */ | 189 | movl %esi,%r8d /* 5th arg: 4th syscall arg */ |
190 | movl %edx,%r8d /* 5th arg: 3rd syscall arg */ | 190 | movl %ecx,%r9d /*swap with edx*/ |
191 | /* (already in %ecx) 4th arg: 2nd syscall arg */ | 191 | movl %edx,%ecx /* 4th arg: 3rd syscall arg */ |
192 | movl %ebx,%edx /* 3rd arg: 1st syscall arg */ | 192 | movl %r9d,%edx /* 3rd arg: 2nd syscall arg */ |
193 | movl %eax,%esi /* 2nd arg: syscall number */ | 193 | movl %ebx,%esi /* 2nd arg: 1st syscall arg */ |
194 | movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */ | 194 | movl %eax,%edi /* 1st arg: syscall number */ |
195 | call __audit_syscall_entry | 195 | call __audit_syscall_entry |
196 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */ | 196 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */ |
197 | cmpq $(IA32_NR_syscalls-1),%rax | 197 | cmpq $(IA32_NR_syscalls-1),%rax |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 0d0c9d4ab6d5..f9e3fabc8716 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -449,12 +449,11 @@ sysenter_audit: | |||
449 | jnz syscall_trace_entry | 449 | jnz syscall_trace_entry |
450 | addl $4,%esp | 450 | addl $4,%esp |
451 | CFI_ADJUST_CFA_OFFSET -4 | 451 | CFI_ADJUST_CFA_OFFSET -4 |
452 | /* %esi already in 8(%esp) 6th arg: 4th syscall arg */ | 452 | movl %esi,4(%esp) /* 5th arg: 4th syscall arg */ |
453 | /* %edx already in 4(%esp) 5th arg: 3rd syscall arg */ | 453 | movl %edx,(%esp) /* 4th arg: 3rd syscall arg */ |
454 | /* %ecx already in 0(%esp) 4th arg: 2nd syscall arg */ | 454 | /* %ecx already in %ecx 3rd arg: 2nd syscall arg */ |
455 | movl %ebx,%ecx /* 3rd arg: 1st syscall arg */ | 455 | movl %ebx,%edx /* 2nd arg: 1st syscall arg */ |
456 | movl %eax,%edx /* 2nd arg: syscall number */ | 456 | /* %eax already in %eax 1st arg: syscall number */ |
457 | movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */ | ||
458 | call __audit_syscall_entry | 457 | call __audit_syscall_entry |
459 | pushl_cfi %ebx | 458 | pushl_cfi %ebx |
460 | movl PT_EAX(%esp),%eax /* reload syscall number */ | 459 | movl PT_EAX(%esp),%eax /* reload syscall number */ |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index c844f0816ab8..5e8cb2ad9fb3 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -488,12 +488,11 @@ badsys: | |||
488 | * jump back to the normal fast path. | 488 | * jump back to the normal fast path. |
489 | */ | 489 | */ |
490 | auditsys: | 490 | auditsys: |
491 | movq %r10,%r9 /* 6th arg: 4th syscall arg */ | 491 | movq %r10,%r8 /* 5th arg: 4th syscall arg */ |
492 | movq %rdx,%r8 /* 5th arg: 3rd syscall arg */ | 492 | movq %rdx,%rcx /* 4th arg: 3rd syscall arg */ |
493 | movq %rsi,%rcx /* 4th arg: 2nd syscall arg */ | 493 | movq %rsi,%rdx /* 3rd arg: 2nd syscall arg */ |
494 | movq %rdi,%rdx /* 3rd arg: 1st syscall arg */ | 494 | movq %rdi,%rsi /* 2nd arg: 1st syscall arg */ |
495 | movq %rax,%rsi /* 2nd arg: syscall number */ | 495 | movq %rax,%rdi /* 1st arg: syscall number */ |
496 | movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */ | ||
497 | call __audit_syscall_entry | 496 | call __audit_syscall_entry |
498 | LOAD_ARGS 0 /* reload call-clobbered registers */ | 497 | LOAD_ARGS 0 /* reload call-clobbered registers */ |
499 | jmp system_call_fastpath | 498 | jmp system_call_fastpath |