Re: [PATCH for_v29 2/8] x86/sgx: vdso: Make the %rsp fixup on return from handler relative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 18, 2020 at 06:11:24PM -0700, Sean Christopherson wrote:
> Modify the %rsp fixup after returning from the exit handler to be
> relative instead of absolute to avoid clobbering any %rsp adjustments
> made by the exit handler, e.g. if the exit handler modifies the stack
> prior to re-entering the enclave.
> 
> Reported-by: Nathaniel McCallum <npmccallum@xxxxxxxxxx>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> ---
> 
> I'm on the fence as to whether or not this is a good idea.  It's not super
> painful, but it's not exactly standard/obvious code.  Part of me thinks
> its a bug to not let the exit handler manipulate %rsp, the other part of
> me thinks it's straight up crazy :-)

After some hours of processing this, I think this makes sense.

It makes the interface more robust. This is not printf().

/Jarkko



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux