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

2021-02-16 Thread Sedat Dilek
On Tue, Feb 16, 2021 at 7:45 PM Nick Desaulniers wrote: > > On Sat, Feb 13, 2021 at 11:19 AM 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

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

2021-02-16 Thread Sedat Dilek
On Tue, Feb 16, 2021 at 5:21 PM Sean Christopherson wrote: > > On Sat, Feb 13, 2021, Andy Lutomirski wrote: > > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c > > index f923e14e87df..ec39073b4897 100644 > > --- a/arch/x86/kvm/svm/svm.c > > +++ b/arch/x86/kvm/svm/svm.c > > @@

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

2021-02-16 Thread Nick Desaulniers
On Sat, Feb 13, 2021 at 11:19 AM 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

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

2021-02-16 Thread Sean Christopherson
On Sat, Feb 13, 2021, Andy Lutomirski wrote: > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c > index f923e14e87df..ec39073b4897 100644 > --- a/arch/x86/kvm/svm/svm.c > +++ b/arch/x86/kvm/svm/svm.c > @@ -1467,12 +1467,8 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu) > #ifdef

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

2021-02-13 Thread Sedat Dilek
On Sat, Feb 13, 2021 at 8:19 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

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

2021-02-13 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 depends on whether