* [PATCH] x86-64: replace left over sti/cli in ia32 audit exit code
@ 2013-01-30 7:55 Jan Beulich
2013-01-31 11:07 ` [tip:x86/urgent] x86-64: Replace left over sti/ cli " tip-bot for Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2013-01-30 7:55 UTC (permalink / raw)
To: mingo, tglx, hpa
Cc: David Vrabel, Peter Moody, Konrad Rzeszutek Wilk, linux-kernel,
stable
For some reason they didn't get replaced so far by their paravirt
equivalents, resulting in code to be run with interrupts disabled that
doesn't expect so (causing, in the observed case, a BUG_ON() to
trigger) when syscall auditing is enabled.
David (Cc-ed) came up with an identical fix, so likely this can be
taken to count as an ack from him.
Reported-by: Peter Moody <pmoody@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: stable@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Tested-by: Peter Moody <pmoody@google.com>
---
arch/x86/ia32/ia32entry.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 3.8-rc5/arch/x86/ia32/ia32entry.S
+++ 3.8-rc5-x86_64-paravirt-ia32-audit-exit/arch/x86/ia32/ia32entry.S
@@ -207,7 +207,7 @@ sysexit_from_sys_call:
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
jnz ia32_ret_from_sys_call
TRACE_IRQS_ON
- sti
+ ENABLE_INTERRUPTS(CLBR_NONE)
movl %eax,%esi /* second arg, syscall return value */
cmpl $-MAX_ERRNO,%eax /* is it an error ? */
jbe 1f
@@ -217,7 +217,7 @@ sysexit_from_sys_call:
call __audit_syscall_exit
movq RAX-ARGOFFSET(%rsp),%rax /* reload syscall return value */
movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
- cli
+ DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
testl %edi,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
jz \exit
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86-64: Replace left over sti/ cli in ia32 audit exit code
2013-01-30 7:55 [PATCH] x86-64: replace left over sti/cli in ia32 audit exit code Jan Beulich
@ 2013-01-31 11:07 ` tip-bot for Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Jan Beulich @ 2013-01-31 11:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, konrad.wilk, jbeulich, pmoody, JBeulich,
tglx, david.vrabel
Commit-ID: 40a1ef95da85843696fc3ebe5fce39b0db32669f
Gitweb: http://git.kernel.org/tip/40a1ef95da85843696fc3ebe5fce39b0db32669f
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed, 30 Jan 2013 07:55:53 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 31 Jan 2013 10:36:01 +0100
x86-64: Replace left over sti/cli in ia32 audit exit code
For some reason they didn't get replaced so far by their
paravirt equivalents, resulting in code to be run with
interrupts disabled that doesn't expect so (causing, in the
observed case, a BUG_ON() to trigger) when syscall auditing is
enabled.
David (Cc-ed) came up with an identical fix, so likely this can
be taken to count as an ack from him.
Reported-by: Peter Moody <pmoody@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/5108E01902000078000BA9C5@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Tested-by: Peter Moody <pmoody@google.com>
---
arch/x86/ia32/ia32entry.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 102ff7c..142c4ce 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -207,7 +207,7 @@ sysexit_from_sys_call:
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
jnz ia32_ret_from_sys_call
TRACE_IRQS_ON
- sti
+ ENABLE_INTERRUPTS(CLBR_NONE)
movl %eax,%esi /* second arg, syscall return value */
cmpl $-MAX_ERRNO,%eax /* is it an error ? */
jbe 1f
@@ -217,7 +217,7 @@ sysexit_from_sys_call:
call __audit_syscall_exit
movq RAX-ARGOFFSET(%rsp),%rax /* reload syscall return value */
movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
- cli
+ DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
testl %edi,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
jz \exit
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-31 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 7:55 [PATCH] x86-64: replace left over sti/cli in ia32 audit exit code Jan Beulich
2013-01-31 11:07 ` [tip:x86/urgent] x86-64: Replace left over sti/ cli " tip-bot for Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox