Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-25 Thread Thomas Gleixner
On Fri, 24 Oct 2014, Borislav Petkov wrote: > On Thu, Oct 23, 2014 at 04:43:03PM -0700, Andy Lutomirski wrote: > > Presumably the actual failure is a #GP when trying to do the rdtsc. If > > so, wouldn't a better fix be to make that rdtsc check cpuid first? Can > > we easily check cpuid that early?

Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-25 Thread Thomas Gleixner
On Fri, 24 Oct 2014, Borislav Petkov wrote: On Thu, Oct 23, 2014 at 04:43:03PM -0700, Andy Lutomirski wrote: Presumably the actual failure is a #GP when trying to do the rdtsc. If so, wouldn't a better fix be to make that rdtsc check cpuid first? Can we easily check cpuid that early? I

Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-24 Thread Borislav Petkov
On Thu, Oct 23, 2014 at 04:43:03PM -0700, Andy Lutomirski wrote: > Presumably the actual failure is a #GP when trying to do the rdtsc. If > so, wouldn't a better fix be to make that rdtsc check cpuid first? Can > we easily check cpuid that early? I don't see why not. The real question, though

Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-24 Thread Borislav Petkov
On Thu, Oct 23, 2014 at 04:43:03PM -0700, Andy Lutomirski wrote: Presumably the actual failure is a #GP when trying to do the rdtsc. If so, wouldn't a better fix be to make that rdtsc check cpuid first? Can we easily check cpuid that early? I don't see why not. The real question, though is,

Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-23 Thread Andy Lutomirski
On 10/23/2014 03:10 PM, Ben Harris wrote: > On x86, boot_init_stack_canary() unconditionally calls > __native_read_tsc(). This means that when a kernel with > CONFIG_CC_STACKPROTECTOR enabled is booted on a CPU without a TSC, the > kernel hangs at startup. See

[PATCH] x86: Don't allow stackprotector without TSC

2014-10-23 Thread Ben Harris
On x86, boot_init_stack_canary() unconditionally calls __native_read_tsc(). This means that when a kernel with CONFIG_CC_STACKPROTECTOR enabled is booted on a CPU without a TSC, the kernel hangs at startup. See for an example. To avoid this, make

[PATCH] x86: Don't allow stackprotector without TSC

2014-10-23 Thread Ben Harris
On x86, boot_init_stack_canary() unconditionally calls __native_read_tsc(). This means that when a kernel with CONFIG_CC_STACKPROTECTOR enabled is booted on a CPU without a TSC, the kernel hangs at startup. See https://bugs.debian.org/766105 for an example. To avoid this, make

Re: [PATCH] x86: Don't allow stackprotector without TSC

2014-10-23 Thread Andy Lutomirski
On 10/23/2014 03:10 PM, Ben Harris wrote: On x86, boot_init_stack_canary() unconditionally calls __native_read_tsc(). This means that when a kernel with CONFIG_CC_STACKPROTECTOR enabled is booted on a CPU without a TSC, the kernel hangs at startup. See https://bugs.debian.org/766105 for an