Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1558799pxb; Sun, 22 Aug 2021 21:50:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuCWR+sJTTT4nZknWuFwMW6+nOTjdhNU/KBh3SO+IFgbb/cPVrVHJnXiLKquq0a6XaPGir X-Received: by 2002:a05:6402:26cb:: with SMTP id x11mr15660875edd.343.1629694216833; Sun, 22 Aug 2021 21:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629694216; cv=none; d=google.com; s=arc-20160816; b=qCbV7ICHswS6jtS6PgFk36DkSn47YliUmNDoKnhHyNTaTaIfke+aaqZh9wvtE0IhJw Urwyjp/cZHHomLaz41DgEqn7czpcUfuHoJ0iGWomZ3DNzx2k7YYkhCDEvhvcYcGHd6O7 eP/8FKzW5yK/rqEiOfW4kNvIqEjktGNOK3Lg1AciabnwrKMa4LXAIu4X7GHVAPoh/aUr 3/7Vm7QHrucuw6XixxFSh29WNgghuQtTVX9t4HdQl05JWGi0UJBMyAGI7ZgO+8tnvQ/C wSH6PppobLcQAjwyGsOCKHx0Pf31OnUsfYq/bGZFufPVLOmplw5pEl4UtmQM/kxdy0LW PHWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Wemuc7ifFKY1JG/J29bORf/DK0p/Jh7ow0XTFAR5vaQ=; b=DPw4EqfKbJMvLvm++YYypLxFInqN/qyIH5EUGCgKGxEAoUvK5ZWlYYfCVNYBbKuHoB HhobOhDNQEgS/Pl/MyoWP/xbvoWRsFvmoE5rXDJtBDkr3SzYg8XYcFIviCtR4GXDLFOM lMoymDYo/NFVfMmKg5r2SUSpZDDx+mnnOOIRBqi3P3i0kR+OIrIoIgXGNfxollVkRKng prGRPByCcvuOAlofE+BitfEGUHtYytMvimjrSnFvY7fC7uaBoc234gNDKrIS2Pc2SJjS jqP2Jkm9Xgf4xmIGnbNeSb0SfEiQsIWXIeUOPFOgbnda24K/Cm9z3HNi4CoA5P3vLf6k m5pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=GWFpORbv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw3si7623274edb.297.2021.08.22.21.49.42; Sun, 22 Aug 2021 21:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=GWFpORbv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbhHWEuV (ORCPT + 99 others); Mon, 23 Aug 2021 00:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbhHWEuV (ORCPT ); Mon, 23 Aug 2021 00:50:21 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2320C061575; Sun, 22 Aug 2021 21:49:38 -0700 (PDT) Received: from zn.tnic (p200300ec2f07d90037f6d6bcf935006e.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:d900:37f6:d6bc:f935:6e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 510D11EC0464; Mon, 23 Aug 2021 06:49:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629694172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Wemuc7ifFKY1JG/J29bORf/DK0p/Jh7ow0XTFAR5vaQ=; b=GWFpORbvrZ8l8jHKGAzgi+Cz1txdHdZz8F9sjQY9xBZvlXhqDXf+r0vx5NE81Hj6mQ8dlo +IAvWd5e/mO995J1rlhjfLNvLK6UguEzHzL5ps2RT1YPXRl84mVgESeSiD7AG2hGH8zBHe mNWAN3/Z4gJGd5z3iKn0CHCn+yqr8j0= Date: Mon, 23 Aug 2021 06:50:06 +0200 From: Borislav Petkov To: Michael Roth Cc: Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Vlastimil Babka , tony.luck@intel.com, brijesh.ksingh@gmail.com Subject: Re: [PATCH Part1 RFC v4 22/36] x86/sev: move MSR-based VMGEXITs for CPUID to helper Message-ID: References: <20210707181506.30489-1-brijesh.singh@amd.com> <20210707181506.30489-23-brijesh.singh@amd.com> <20210819153741.h6yloeihz5vl6hvu@amd.com> <20210820032908.vqnptvjqnp7xxa6i@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210820032908.vqnptvjqnp7xxa6i@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Aug 19, 2021 at 10:29:08PM -0500, Michael Roth wrote: > The select cases where we still fetch CPUID values from hypervisor in > SNP need careful consideration, so for the purposes of auditing the code > for security, or just noticing things in patches, I think it's important > to make it clear what is the "normal" SNP case (not trusting hypervisor > CPUID values) and what are exceptional cases (getting select values from > hypervisor). If something got added in the future, I think something > like: > > +sev_cpuid_hv(0x8000001f, ...) > > would be more likely to raise eyebrows and get more scrutiny than: > > +sev_cpuid(0x8000001f, ...) > > where it might get lost in the noise or mistaken as similar to > sev_snp_cpuid(). > > Maybe a bit contrived, and probably not a big deal in practice, but > conveying the source it in the naming does seem at least seem slightly > better than not doing so. Ok, makes sense. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette