lkml.org 
[lkml]   [2021]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 06/11] x86/traps: Add #VE support for TDX guest
From
Date
On 10/18/21 3:53 AM, Borislav Petkov wrote:
> On Sun, Oct 17, 2021 at 10:15:22AM -0700, Dave Hansen wrote:
>> I think it's equivalent to something like a 'pt_regs' or 'stack_info'
>> that we pass around in other exception handlers. It's always stack
>> allocated. It's never dynamically allocated and NULL is never passed
>> for some other semantic reason.
> Ok, but why is adding that check such a big deal?

It's really not a big deal.

> Are you saying that nothing else will call tdx_get_ve_info() in the
> future so we should trust the passed in *ve pointer blindly or should we
> simply add that cheap check just in case.
>
> I don't mind having it without it but wondering why a little defensive
> programming is a problem, at all.

It's not a problem. I think I'd just rather see a splat (oops or
WARN_ON_ONCE()) than silently returning an error.

\
 
 \ /
  Last update: 2021-10-18 16:10    [W:0.099 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site