chengshan / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
e293be
Note:  this bug was taken from Commit-ID: 26c2d2b39128adba276d140eefa2745591b88536
e293be
and corrected for white space differences between the RHEL-7.1 3.10.0-229 upstream 
e293be
kernel.
e293be
---
e293be
diff -uNrp a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
e293be
--- a/arch/x86/kernel/entry_32.S	2015-05-17 07:39:14.371778177 -0500
e293be
+++ b/arch/x86/kernel/entry_32.S	2015-05-17 07:36:13.654610869 -0500
e293be
@@ -457,15 +457,14 @@ sysenter_exit:
e293be
 sysenter_audit:
e293be
 	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
e293be
 	jnz syscall_trace_entry
e293be
-	addl $4,%esp
e293be
-	CFI_ADJUST_CFA_OFFSET -4
e293be
-	movl %esi,4(%esp)		/* 5th arg: 4th syscall arg */
e293be
-	movl %edx,(%esp)		/* 4th arg: 3rd syscall arg */
e293be
-	/* %ecx already in %ecx		   3rd arg: 2nd syscall arg */
e293be
-	movl %ebx,%edx			/* 2nd arg: 1st syscall arg */
e293be
-	/* %eax already in %eax		   1st arg: syscall number */
e293be
+	/* movl PT_EAX(%esp), %eax        already set, syscall number: 1st arg to audit */
e293be
+	movl PT_EBX(%esp), %edx                /* ebx/a0: 2nd arg to audit */
e293be
+ 	/* movl PT_ECX(%esp), %ecx        already set, a1: 3nd arg to audit */
e293be
+	pushl_cfi PT_ESI(%esp)                /* a3: 5th arg */
e293be
+	pushl_cfi PT_EDX+4(%esp)        /* a2: 4th arg */
e293be
 	call __audit_syscall_entry
e293be
-	pushl_cfi %ebx
e293be
+	popl_cfi %ecx /* get that remapped edx off the stack */
e293be
+	popl_cfi %ecx /* get that remapped esi off the stack */
e293be
 	movl PT_EAX(%esp),%eax		/* reload syscall number */
e293be
 	jmp sysenter_do_call
e293be
 
e293be
---