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]
Date:   Thu, 2 Sep 2021 10:27:38 -0500
From:   Brijesh Singh <brijesh.singh@....com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     brijesh.singh@....com, x86@...nel.org,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        linux-efi@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-coco@...ts.linux.dev, linux-mm@...ck.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Joerg Roedel <jroedel@...e.de>,
        Tom Lendacky <thomas.lendacky@....com>,
        "H. Peter Anvin" <hpa@...or.com>, Ard Biesheuvel <ardb@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Sergio Lopez <slp@...hat.com>, Peter Gonda <pgonda@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        David Rientjes <rientjes@...gle.com>,
        Dov Murik <dovmurik@...ux.ibm.com>,
        Tobin Feldman-Fitzthum <tobin@....com>,
        Michael Roth <michael.roth@....com>,
        Vlastimil Babka <vbabka@...e.cz>,
        "Kirill A . Shutemov" <kirill@...temov.name>,
        Andi Kleen <ak@...ux.intel.com>, tony.luck@...el.com,
        marcorr@...gle.com, sathyanarayanan.kuppuswamy@...ux.intel.com
Subject: Re: [PATCH Part1 v5 34/38] x86/sev: Add snp_msg_seqno() helper



On 9/2/21 6:26 AM, Borislav Petkov wrote:
> On Mon, Aug 30, 2021 at 10:07:39AM -0500, Brijesh Singh wrote:
>> The SNP firmware spec says that counter must begin with the 1.
> 
> So put that in the comment and explain what 0 is: magic or invalid or
> whatnot and why is that so and that it is spec-ed this way, etc.
> 
> Just having it there without a reasoning makes one wonder whether that's
> some arbitrary limitation or so.

Agreed, I will add a comment explaining it.

> 
>> During the GHCB writing the seqno use to be 32-bit value and hence the GHCB
>> spec choose the 32-bit value but recently the SNP firmware changed it from
>> the 32 to 64. So, now we are left with the option of limiting the sequence
>> number to 32-bit. If we go beyond 32-bit then all we can do is fail the
>> call. If we pass the value of zero then FW will fail the call.
> 
> That sounds weird again. So make it 64-bit like the FW and fix the spec.
> 
>> I just choose the smaller name but I have no issues matching with the spec.
>> Also those keys does not have anything to do with the VMPL level. The
>> secrets page provides 4 different keys and they are referred as vmpck0..3
>> and each of them have a sequence numbers associated with it.
>>
>> In GHCB v3 we probably need to rework the structure name.
> 
> You can point to the spec section so that readers can find the struct
> layout there.
> 

I will add comment that this for spec 0.9+.

thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ