Re: [PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-06 Thread Andy Lutomirski
On Tue, Oct 6, 2020 at 10:14 AM Brian Gerst wrote: > > On Mon, Oct 5, 2020 at 3:31 PM Andy Lutomirski wrote: > > > > On 32-bit kernels, the stackprotector canary is quite nasty -- it is > > stored at %gs:(20), which is nasty because 32-bit kernels use %fs for > > percpu storage. It's even

Re: [PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-06 Thread Brian Gerst
On Mon, Oct 5, 2020 at 3:31 PM Andy Lutomirski wrote: > > On 32-bit kernels, the stackprotector canary is quite nasty -- it is > stored at %gs:(20), which is nasty because 32-bit kernels use %fs for > percpu storage. It's even nastier because it means that whether %gs > contains userspace state

Re: [PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-06 Thread Peter Zijlstra
On Mon, Oct 05, 2020 at 12:30:03PM -0700, Andy Lutomirski wrote: > @@ -441,6 +441,9 @@ struct fixed_percpu_data { >* GCC hardcodes the stack canary as %gs:40. Since the >* irq_stack is the object at %gs:0, we reserve the bottom >* 48 bytes of the irq stack for the canary.

Re: [PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-05 Thread Andy Lutomirski
On Mon, Oct 5, 2020 at 7:29 PM Sean Christopherson wrote: > > On Mon, Oct 05, 2020 at 12:30:03PM -0700, Andy Lutomirski wrote: > > On 32-bit kernels, the stackprotector canary is quite nasty -- it is > > stored at %gs:(20), which is nasty because 32-bit kernels use %fs for > > percpu storage.

Re: [PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-05 Thread Sean Christopherson
On Mon, Oct 05, 2020 at 12:30:03PM -0700, Andy Lutomirski wrote: > On 32-bit kernels, the stackprotector canary is quite nasty -- it is > stored at %gs:(20), which is nasty because 32-bit kernels use %fs for > percpu storage. It's even nastier because it means that whether %gs > contains

[PATCH 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable

2020-10-05 Thread Andy Lutomirski
On 32-bit kernels, the stackprotector canary is quite nasty -- it is stored at %gs:(20), which is nasty because 32-bit kernels use %fs for percpu storage. It's even nastier because it means that whether %gs contains userspace state or kernel state while running kernel code sepends on whether