[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f04c6c0-31c6-9293-25c1-ea4bc1722dc8@intel.com>
Date: Mon, 18 Oct 2021 07:05:21 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Paolo Bonzini <pbonzini@...hat.com>,
David Hildenbrand <david@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Juergen Gross <jgross@...e.com>, Deep Shah <sdeep@...are.com>,
VMware Inc <pv-drivers@...are.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, Peter H Anvin <hpa@...or.com>,
Tony Luck <tony.luck@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
Sean Christopherson <seanjc@...gle.com>,
Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 06/11] x86/traps: Add #VE support for TDX guest
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.
Powered by blists - more mailing lists