Re: [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Boris Ostrovsky
On 04/09/2014 11:25 AM, Steven Rostedt wrote: On Wed, 09 Apr 2014 11:12:33 -0400 Boris Ostrovsky wrote: Commit 198d208df4371734ac4728f69cb585c284d20a15 made 32-bit kernels use kernel_stack to point to thread_info. That change missed a couple of updates needed by Xen's PV guests: 1. kernel_sta

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Jan Beulich
>>> On 09.04.14 at 17:38, wrote: > On 04/09/2014 11:01 AM, Jan Beulich wrote: > On 09.04.14 at 16:41, wrote: >>> The latter load however can easy fault; The arguments for %ds in >>> XSA-42/ CVE-2013-0228 applies to %{e,f,g}s as well. >> And it was only that latter operation that I pointed at.

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Boris Ostrovsky
On 04/09/2014 11:01 AM, Jan Beulich wrote: On 09.04.14 at 16:41, wrote: The latter load however can easy fault; The arguments for %ds in XSA-42/ CVE-2013-0228 applies to %{e,f,g}s as well. And it was only that latter operation that I pointed at. We don't seem to reference %fs after the pop s

Re: [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Steven Rostedt
On Wed, 09 Apr 2014 11:12:33 -0400 Boris Ostrovsky wrote: > Commit 198d208df4371734ac4728f69cb585c284d20a15 made 32-bit kernels use > kernel_stack to point to thread_info. That change missed a couple of > updates needed by Xen's PV guests: > > 1. kernel_stack needs to be initialized for secondar

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Jan Beulich
>>> On 09.04.14 at 16:41, wrote: > The latter load however can easy fault; The arguments for %ds in > XSA-42/ CVE-2013-0228 applies to %{e,f,g}s as well. And it was only that latter operation that I pointed at. > Furthermore, I am a little concerned about the performance impact of > this. I wo

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Andrew Cooper
On 09/04/14 15:29, David Vrabel wrote: > On 09/04/14 15:21, Jan Beulich wrote: > On 09.04.14 at 16:06, wrote: >>> --- a/arch/x86/xen/xen-asm_32.S >>> +++ b/arch/x86/xen/xen-asm_32.S >>> @@ -88,7 +88,11 @@ ENTRY(xen_iret) >>> * avoid having to reload %fs >>> */ >>> #ifdef CONFIG_SMP

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread David Vrabel
On 09/04/14 15:21, Jan Beulich wrote: On 09.04.14 at 16:06, wrote: >> --- a/arch/x86/xen/xen-asm_32.S >> +++ b/arch/x86/xen/xen-asm_32.S >> @@ -88,7 +88,11 @@ ENTRY(xen_iret) >> * avoid having to reload %fs >> */ >> #ifdef CONFIG_SMP >> +pushw %fs >> +movl $(__KERNEL_PERC

Re: [Xen-devel] [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Jan Beulich
>>> On 09.04.14 at 16:06, wrote: > --- a/arch/x86/xen/xen-asm_32.S > +++ b/arch/x86/xen/xen-asm_32.S > @@ -88,7 +88,11 @@ ENTRY(xen_iret) >* avoid having to reload %fs >*/ > #ifdef CONFIG_SMP > + pushw %fs > + movl $(__KERNEL_PERCPU), %eax > + movl %eax, %fs > GE

Re: [PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread David Vrabel
On 09/04/14 15:06, Boris Ostrovsky wrote: > Commit 198d208df4371734ac4728f69cb585c284d20a15 made 32-bit kernels use > kernel_stack to point to thread_info. That change missed a couple of > updates needed by Xen's PV guests: Can you put the commit subject in addition to the hash? > 1. kernel_stack

[PATCH] x86/xen: Fix 32-bit PV guests's usage of kernel_stack

2014-04-09 Thread Boris Ostrovsky
Commit 198d208df4371734ac4728f69cb585c284d20a15 made 32-bit kernels use kernel_stack to point to thread_info. That change missed a couple of updates needed by Xen's PV guests: 1. kernel_stack needs to be initialized for secondary CPUs 2. GET_THREAD_INFO() now uses %fs register which may not be the