* [PATCH, resend] x86-64: fix HYPERVISOR_update_descriptor()
@ 2009-03-12 11:54 Jan Beulich
2009-03-12 11:58 ` [tip:x86/urgent] x86: " Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2009-03-12 11:54 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: jeremy.fitzhardinge, linux-kernel
Impact: fix potential oops during app-initiated LDT manipulation
The underlying hypercall has differing argument requirements on 32-
and 64-bit.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
arch/x86/include/asm/xen/hypercall.h | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.29-rc7/arch/x86/include/asm/xen/hypercall.h 2009-03-11 17:52:10.000000000 +0100
+++ 2.6.29-rc7-x86_64-xen-update-descr/arch/x86/include/asm/xen/hypercall.h 2009-02-13 11:41:39.000000000 +0100
@@ -296,6 +296,8 @@ HYPERVISOR_get_debugreg(int reg)
static inline int
HYPERVISOR_update_descriptor(u64 ma, u64 desc)
{
+ if (sizeof(u64) == sizeof(long))
+ return _hypercall2(int, update_descriptor, ma, desc);
return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
}
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:x86/urgent] x86: fix HYPERVISOR_update_descriptor()
2009-03-12 11:54 [PATCH, resend] x86-64: fix HYPERVISOR_update_descriptor() Jan Beulich
@ 2009-03-12 11:58 ` Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2009-03-12 11:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, jbeulich, tglx, mingo, jeremy.fitzhardinge
Commit-ID: 6a5c05f002c3e4f24887a5fe8e7df757d339d368
Gitweb: http://git.kernel.org/tip/6a5c05f002c3e4f24887a5fe8e7df757d339d368
Author: "Jan Beulich" <jbeulich@novell.com>
AuthorDate: Thu, 12 Mar 2009 11:54:54 +0000
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 12 Mar 2009 12:56:21 +0100
x86: fix HYPERVISOR_update_descriptor()
Impact: fix potential oops during app-initiated LDT manipulation
The underlying hypercall has differing argument requirements on 32-
and 64-bit.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
LKML-Reference: <49B9061E.76E4.0078.0@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/xen/hypercall.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index 5e79ca6..9c371e4 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -296,6 +296,8 @@ HYPERVISOR_get_debugreg(int reg)
static inline int
HYPERVISOR_update_descriptor(u64 ma, u64 desc)
{
+ if (sizeof(u64) == sizeof(long))
+ return _hypercall2(int, update_descriptor, ma, desc);
return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-12 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 11:54 [PATCH, resend] x86-64: fix HYPERVISOR_update_descriptor() Jan Beulich
2009-03-12 11:58 ` [tip:x86/urgent] x86: " Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome