lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a40602af50a2473a9260dc0af9a9fd6e@intel.com>
Date:   Thu, 27 May 2021 16:25:42 +0000
From:   "Luck, Tony" <tony.luck@...el.com>
To:     "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        "Hansen, Dave" <dave.hansen@...el.com>
CC:     Andi Kleen <ak@...ux.intel.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC v2-fix-v2 1/1] x86/tdx: Add __tdx_module_call() and
 __tdx_hypercall() helper functions

>> Looking at the code, the hypercall can return an error if TDCALL fails,
>> but module_call forces a panic with UD2 on error. This difference isn't
>> explained anywhere.
>
> I think you meant hypercall will panic vs module call will not.

yes

> In hypercall case, since we use same TDCALL instruction, we will have two
> return values. One is for TDCALL failure (at the TDX module level) and
> other is return value from VMM. So in hypercall case, we return VMM value
> to the user but panic for TDCALL failures. As per TDX spec, for hypercall
> use case, if everything is in order, TDCALL will never fail. If we notice
> TDCALL failure error then it means, we are working with the broken TDX module.
> So we panic.

Add a comment in the .S file right before that ud2 explaining this. That
should help anyone tracking down that panic understand that the problem
is in the TDX module.

Otherwise looks ok.

Reviewed-by: Tony Luck <tony.luck@...el.com>

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ