Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-07-02 Thread Thomas Gleixner
Andy Lutomirski writes: > On Tue, Jun 30, 2020 at 1:41 AM Borislav Petkov wrote: >> >> On Mon, Jun 29, 2020 at 11:00:55PM -0700, Sean Christopherson wrote: >> > E.g. the vDSO function should get the fixup even if userspace screws >> > up mmap() and invokes __vdso_sgx_enter_enclave() without being

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-30 Thread Sean Christopherson
On Tue, Jun 30, 2020 at 09:48:22AM -0700, Andy Lutomirski wrote: > On Tue, Jun 30, 2020 at 1:41 AM Borislav Petkov wrote: > > > > On Mon, Jun 29, 2020 at 11:00:55PM -0700, Sean Christopherson wrote: > > > E.g. the vDSO function should get the fixup even if userspace screws > > > up mmap() and invo

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-30 Thread Andy Lutomirski
On Tue, Jun 30, 2020 at 1:41 AM Borislav Petkov wrote: > > On Mon, Jun 29, 2020 at 11:00:55PM -0700, Sean Christopherson wrote: > > E.g. the vDSO function should get the fixup even if userspace screws > > up mmap() and invokes __vdso_sgx_enter_enclave() without being tagged > > an SGX task. > > I

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-30 Thread Sean Christopherson
On Tue, Jun 30, 2020 at 10:41:28AM +0200, Borislav Petkov wrote: > On Mon, Jun 29, 2020 at 11:00:55PM -0700, Sean Christopherson wrote: > > E.g. the vDSO function should get the fixup even if userspace screws > > up mmap() and invokes __vdso_sgx_enter_enclave() without being tagged > > an SGX task.

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-30 Thread Borislav Petkov
On Mon, Jun 29, 2020 at 11:00:55PM -0700, Sean Christopherson wrote: > E.g. the vDSO function should get the fixup even if userspace screws > up mmap() and invokes __vdso_sgx_enter_enclave() without being tagged > an SGX task. I sincerely hope you don't mean this seriously. Please add a member to

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-29 Thread Sean Christopherson
On Mon, Jun 29, 2020 at 07:10:22PM +0200, Borislav Petkov wrote: > On Thu, Jun 18, 2020 at 01:08:37AM +0300, Jarkko Sakkinen wrote: > ... > > intended benefit of massaging GCC's inlining algorithm is unlikely to > > realized in the vDSO any time soon, if ever. > > That is a very good explanation a

Re: [PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-29 Thread Borislav Petkov
On Thu, Jun 18, 2020 at 01:08:37AM +0300, Jarkko Sakkinen wrote: ... > intended benefit of massaging GCC's inlining algorithm is unlikely to > realized in the vDSO any time soon, if ever. That is a very good explanation and I would prefer if it would be in a sgx-specific README or so instead of it

[PATCH v33 15/21] x86/vdso: Add support for exception fixup in vDSO functions

2020-06-17 Thread Jarkko Sakkinen
From: Sean Christopherson The basic concept and implementation is very similar to the kernel's exception fixup mechanism. The key differences are that the kernel handler is hardcoded and the fixup entry addresses are relative to the overall table as opposed to individual entries. Hardcoding the