Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7572901rwb; Wed, 23 Nov 2022 08:06:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf41WR1923ynFUSOYOJwGXARSpHBUgFn52sDpuVGEKAEGktrDZ2l//i7DR2g6X2ZDM8S9L9/ X-Received: by 2002:a17:90a:7e0d:b0:213:d630:f4af with SMTP id i13-20020a17090a7e0d00b00213d630f4afmr31418571pjl.77.1669219572678; Wed, 23 Nov 2022 08:06:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669219572; cv=pass; d=google.com; s=arc-20160816; b=NKcwOSlBJCFNAs88nufQg49Rlmt3fWiT1h7tQ9ZQncOSWZ0m0I4e7S3fOcgQ5HqsJu A6YQ2UlFIkKlJjw+tfTiBfeQH4tENHc/d+3fEJNjXLAnAHNS+B6vvv4vMw3G89O5VDGh k2a6JDVlyochyuGpMGTj46bl16YkZjVg1aKTni7mLX0XI3oI5KmAH9StjnaFT5XvaGZy djKLCqXMs6jkXqhCdJDPuRIc000MpY4t+0fBZlM/915RJIMb8ybd/egLN5L9c3OkcKkV /ss9NmHoXcOSQnX9ddRndWfhvDTLM/eRCtUsJyD9UXMbyO6UIc22zSeaFPp4fsMs00R/ ofLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:content-language:references:cc:to:subject:from :user-agent:date:message-id:dkim-signature; bh=x0ss5QfybSlv8xEHyl0evKz+7HEX4STfpO45XsXtuyQ=; b=SKFNkrUcZl/dkgwLSW/3Q/NX3jPWyigU8CqBAEh2xS25K5RtPGznrrQN2z8Wm0q01u zE/jl467RUxSyH+yCVdQUiFIYpioGw0k+iWxEznLIR36iUeiVJ82mh9r9ReFK+Y4G2nw RJ4f1dQeG97UwMAKtnsJBF2L8XXSSHOfQMdAltdKCvKpbr/nSNlp0GAcZbhKmjzMdAXd 3JWwf5rUbqQFcTM59lPEMIeTUhAksPnbJLhk+YKKpUboUsSIpMU3peSG/MvE3mVVPx8Z ApJ1qQqpCClFkfsnnmB6EAxOd/EwZnOO69zX9PqdBsHjoDo1VeWBevsW4nry7SmFBp0P o5iA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=xq5xZS3g; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on11-20020a17090b1d0b00b00217ec4647afsi2058110pjb.14.2022.11.23.08.06.00; Wed, 23 Nov 2022 08:06:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=xq5xZS3g; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238784AbiKWPpb (ORCPT + 88 others); Wed, 23 Nov 2022 10:45:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238217AbiKWPpV (ORCPT ); Wed, 23 Nov 2022 10:45:21 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2073.outbound.protection.outlook.com [40.107.223.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C3F377212; Wed, 23 Nov 2022 07:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IPqfxBeUvdvmKW722Qg/0ckrTAWyj891A6AUYVdcqhE/ZJiwLjSquAB03nkzGyiVkAGeQNTA1CZPLbXasLVGMARj1V0Es/+j6L/HznrjK4e/G5n6H81BuaC7//+iKAj8LkWtnapO/vV7KmRQpGYsTrsFXJQO3mRrwe2gpheCTWIEQHjgKzcWuLezJ7AlZ+FCyXF9OGgzooPiF5yVvf06/CEHX3la+d1zBLBotNOD62CzUYB0hOmvexlHx8uWFINGSq1y33e1zK2myAcciPfT/nBp1rbSDGWvjaUwUoz4zKB7v5ZAdeGj6eGjWobLKLDFuuHE3gKmNpZq/KtEKXTx5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x0ss5QfybSlv8xEHyl0evKz+7HEX4STfpO45XsXtuyQ=; b=Ok8LxpLswIWXqUezL3FJy6oK/3Rfbe0AnA6D2FQlntd7XOTjs+seD1KD2qOq2YWDA4hHeDf+yekP9oGavmLPwMa1jX1ffDRw34s5cMJPBlgPSQcjPtSxpt12CNBYWlGbNJmH6mTpGVKl9gZ4H6ThvAax+4NmiLypR8nxObo0dUQnwxP1DasaB4RPrQNp0B0HC/DzMd8xqPE/yiwfAVq8j+OA/dOb9DRidg8elwsestSz1C5SvZGbNouCE6HY62QIlu1ROVblANqFksqpUl8Ap9eILvkZ58abQ5Fz7Nn0pfy7zLmKIwPip/kcfxNUfDPDbtFr52eT2u1/eUn83yz8vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x0ss5QfybSlv8xEHyl0evKz+7HEX4STfpO45XsXtuyQ=; b=xq5xZS3gIZoZuqUA8T6CJy2zHLx3CJR8+tNvkIvCT39wJ3VtULzjW+2rhphrr6/z8gDbe5B0z3hB3L3Aiay0Sr+mRGRziWyNg1rI3XryrYKwpSs8mbMRv1gHVnlgoYF/0GQxEFbA0okn+RI2v5x77UI9AwepcIT3pC4U/OB5QTs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) by MW4PR12MB7168.namprd12.prod.outlook.com (2603:10b6:303:22d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:18 +0000 Received: from DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::6481:82ef:ffb1:4d0a]) by DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::6481:82ef:ffb1:4d0a%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:18 +0000 Message-ID: <72e31182-5855-3a45-ddd7-105cd3e7256c@amd.com> Date: Wed, 23 Nov 2022 21:15:04 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 From: "Nikunj A. Dadhania" Subject: Re: [PATCH] x86/sev: Add SEV-SNP guest feature negotiation support To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, dave.hansen@linux.intel.com, seanjc@google.com, pbonzini@redhat.com, thomas.lendacky@amd.com, michael.roth@amd.com, stable@kernel.org, "Rao, Bharata Bhasker" References: <20221117044433.244656-1-nikunj@amd.com> <7e224da6-6b02-2972-1334-bc8e7894cdab@amd.com> <4ea6e1c3-fae5-a64a-9bd3-f9ea0821fc67@amd.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA0PR01CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ac::19) To DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6309:EE_|MW4PR12MB7168:EE_ X-MS-Office365-Filtering-Correlation-Id: c6abfd11-2958-43a9-8d73-08dacd69b890 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: or1WpPLL1rMCjYtkoKh8+Wn1D+vdjgLvJbuDC1DCSwJLIdCDwbS7heibTKuwTy71kCbQ820/lC/6LiPNwthUT4pNdX+8dqGLm82dlEAaIPZgq0GUfj+Qc8GhrsbpHekWC2n033MulqSaWrP3SFzpnCvkIgmHDl6NC507zMo30T0TQCyToBq1Ekg0kgVeKdRADtzwgApm9d5OaktG6X1f0+824YAixNPw2+Tv8vd1T4iBrnHosEYfpuLJPA/pNPyQ5TBG2WCcUktkBmLdtlMta5bc4ukTV5tu5sgF9Syc0fh/pa7EoumnEHEAHsUbKOw1axSsXxIqSkYAcNGzN9di3RyOTUIKEodoqbGVN85EZUPO8IrnqRJ9/6FH35tlBbKz9rjA6vtpDYuWs7mdtGvLdttqq3pC2sZ/yGnIDaQIIdq+x6UTseg0LhbOu+VpoVZBtU3T9tsICJ7M1FEut6HriBfjWpSogwEe29+EuwDirHXnQFj+tfjPZ9iFjPLG5/c45VA8HY8tvsqcpeoaYwN+JOzw41eUWuwdxWnesfg+ve+KWg2Wf+JAzw1Qej27RNevPmKCP5SZJ3uJj9aNnFl4kYSNC74BeA9jMly4qJl80knkmWfVQAVdo4NPpeLZdcekHTzUhaW8iS1UFe3oTIaYEDe2ZzpreSGGjLaBxzHnazPYQE5PoQr/5rQZ3+4xlTrwISbcWF8BFqusegHz7jBQXvJR4eV9546ivd1uqCDNxvo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6309.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(396003)(136003)(346002)(376002)(451199015)(38100700002)(8936002)(316002)(4326008)(31696002)(7416002)(2906002)(83380400001)(66556008)(5660300002)(26005)(6506007)(66946007)(53546011)(55236004)(6666004)(41300700001)(6512007)(2616005)(66476007)(6916009)(8676002)(6486002)(478600001)(36756003)(186003)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aUVuNTZnYVVkQ1V4Q29UZ0lnQVk1Z2czdThoaTR5UjJ1UlhMMmdDRVF6RXRI?= =?utf-8?B?aEZMUWxqOGVBMHhsbjBOYkVVdXhqK21xSE9QZTcvK1Zid2pRN25SZDVqcnpB?= =?utf-8?B?M092dXQ4QkdnTVMzY0RuM1hSLzUyZmdEblZiQjhIbGtJNkVHaVQreXcyOEY2?= =?utf-8?B?TmkzbS9EdTNaSytjaSt2WEdvTlpIQVp1TW05MHZFOXhSQXFuWWZBYzRIeXhC?= =?utf-8?B?aDI5QkFrNWY2dGxHbVZhMnVSbDhxZW83YUFBUk5lTStNT2UwRlRXdWp1T0xC?= =?utf-8?B?NWtKOWk4THM1bGZUTUs0MG9EQUhUKzdYRWcraGpib1YrQlJSVDBJVXZqSFF5?= =?utf-8?B?VWY1VEFmVG5vUVRqNEVSdnVlZWlTM2c4RD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Id: c6abfd11-2958-43a9-8d73-08dacd69b890 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6309.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:17.9181 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: soUomsAc7pg7cRiIp6L2T8TFBuS3jpN1LUvJfwwVsmJALRP18K4KYGGtzvRzO/bw8EI2WH9JTWBDC5QoNxD4Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7168 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, I will work on sending a v2 patch that addresses all your questions/concerns. On 21/11/22 21:44, Borislav Petkov wrote: > On Fri, Nov 18, 2022 at 06:58:07PM +0530, Nikunj A. Dadhania wrote: >> No: For feature flags that need an enlightened guest, older guests >> should detect and fail booting on any hypervisor that sets this >> feature flag. > > What would happen with such old guests nowadays? Wouldn't they explode > anyway? Yes, and the patch is to prevent that and fail gracefully and so I had CC'ed stable. > And how is this supposed to work in practice? > > I'm guessing this is supposed to address a case where guest owner goes > to a cloud provider, boots an old guest and it magically survives > booting and then it runs with some false sense of security. > > But isn't that part of the whole attestation dance where the guest owner > checks for a minimum set of features it expects to be present? > > Because if you do this and the cloud provider updates the hypervisor, > all the guest owner images might stop working all of a sudden because of > this check. > > So what is the actual, real-life example where this helps? At all? A cloud provider having the hypervisor and qemu with Secure TSC support tries to boot an old guest kernel (v5.19): "-object sev-snp-guest,...,secure-tsc=on -kernel vmlinuz-5.19.0" As per the current behavior, the guest kernel will hang. This patch will make sure that if the hypervisor enables this feature, the guest kernel will know early that an unsupported SNP feature is enabled. The guest then sends a terminate message to the hypervisor, indicating that its not able to fulfill hypervisor request to enable SecureTSC and cannot move ahead. >> The hypervisor can enable various new features flags(in >> SEV_FEATURES[1:63]) and start the guest. The hypervisor does not know >> beforehand that the guest kernel supports the feature that is being >> enabled. > > This is not the right criterion: it should be more like: can a guest > still continue booting with a new feature it doesn't know about and > still provide the same security. That is indeed the criterion. Hence, instead of allowing the guest to continue and have it fail randomly later(which would be a debugging nightmare), this is to detect the unsupported feature early and fail gracefully. > But see above - you need to think very practically here before even > considering such a thing. > >> While booting, SNP guests can discover the hypervisor-enabled features >> by looking at SEV_STATUS MSR. At this point, the SNP guest needs to >> decide either to continue boot or terminate depending on the feature >> support in the guest kernel. Otherwise, if we let the guest continue >> booting with an unsupported feature, the guest can fail in non-obvious >> manner. > > How can an old guest decide when it doesn't even have the intelligence > to do so? > > What you're doing is, have old guests immediately stop booting when they > encounter a new feature - even if that new feature doesn't impair their > security. A slight correction: a) If the new feature was enabled by the HV/QEMU. AND b) The new feature requires guest enablement " -object sev-snp-guest,...,secure-tsc=on -kernel vmlinuz-5.19.0 " And it is not done wholesale. > >> +-------------------+----------+-------------+----------+ >> | HypervisorEnabled | Required | Available | Boot | >> +-------------------+----------+-------------+----------+ >> | Y | Y | N | N (Fail) | > > This means that you need to know those features which would fail an old > guest *upfront*. Like right now. And I hardly doubt that. > >> PREVENT_HOST_IBS will be defined but shouldn't be part of the >> "Required" mask. > > So it doesn't need to be mentioned at all. Yes, we could get rid of defines that do not need to be included in required mask. >> SECURE_TSC should be part of "Required" mask and once secure tsc >> support is up-streamed it should be added to "Available" mask. > > So when a guest owner gets a new guest which supports SECURE_TSC and > tries to boot it on an older HV - which is very much pretty everywhere > the case - cloud providers won't update their HV kernel whenever - that > new guest won't boot at all. I think you misunderstood, if the HV does not have Secure TSC and new guest has Secure TSC, still the guest should boot. As the hypervisor didnt request the feature to be enabled (below row in the table) +-------------------+----------+-------------+----------+ | HypervisorEnabled | Required | Available | Boot | +-------------------+----------+-------------+----------+ | N | Y/N | Y/N | Y | +-------------------+----------+-------------+----------+ > > Which is a bad bad idea. I don't think you want that. > > What you want, rather, is to say in the SECURE_TSC enablement code > > pr_warn("HV doesn't support secure TSC - your guest won't be 100% secure\n"); > > or so. > >> Guests need to check for features enabled by the hypervisor that is not >> supported as well, so that we can terminate the guest right there. > > That needs to be done in the feature enablement code of each feature but > not wholesale like this. > > Anyway, I think you get my point. Regards Nikunj