Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1831385rdb; Wed, 31 Jan 2024 10:17:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHkSdhsX6nlECWIpMY9h9iYlCb2DOz6HjuPyz6ghifvYvAVoiZ7LFqPPwzz+tPN0H9H/JG1 X-Received: by 2002:a17:906:fb0c:b0:a30:d336:d7b6 with SMTP id lz12-20020a170906fb0c00b00a30d336d7b6mr1530930ejb.57.1706725040801; Wed, 31 Jan 2024 10:17:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706725040; cv=pass; d=google.com; s=arc-20160816; b=jq014vchCIz8G8F2E8N3dA9dcAmpIk5sHtoOx1XyzzTluOP36HYcDlSWPMKe4YQRmA Wdh9AKMNdD7uTako5bk7jXRDIfuar9rjJSqWHrkMoObHk9RK/dO8+nUuFoyYbGCca5ec bohBCjrNHJfKU26hnVW1yPkPhNSs4i571uIAzwC7C6ifFT6uJdK/qiEcnPOjwHOIY3xa Xa7o/E2nobGyWp2vOZ5EKTaHIWVoJBw5m4tYVdF1Ytkj1ahJsL41t956mh2z4qZFjDe9 NQA76+nqFn0I6Ci1nPTZO8MBkx9Vhti5v6JrdO06+QCeMX7vmXVEQWY/zSRRu90QoXi4 FE8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=cGoGC6xB6KW9odfFn1t46MQGiYGwOCppmvmcxLORiTA=; fh=Z0/bFutqM7kyNXm5EtJk9aeYgTHJtgFd20JsxEUCc0w=; b=ILfQzEkcCZo+v9qScxwXZkYtof6qB48rMsWCWae4KjhSxCzn7Uk8OGGRWwZrmhmyg7 5uU/Ppq4BIhDzDKThBl247I9f8JaXJHAJ7kS0LDnCHfBvfafSJWijQPBdt9bNgjTso1E P8G+5HmM5EqOsKsM6uEJbTKBAodz7iKoMr91WWRmT8BIx7LKBPSwEo1dx89qUBh2zHs8 zXGT6gClb1l3n7BNcPdQlQFRjKSdL+SQHxVph63D9Q1KWmC6txLDXivF6+XSwCIAMtvY Sfs27pKeAG5xoHc6261uk2izmc6i6cDhIWi4tncAdtwo7Z6aouj8LZYhAlXiPbdAfwOD xs9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=C6blsveO; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-46962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCVVilBUZuzwV2mRpSzd4X1eTcs+nhr72k89Xj6OSvCHK3sbH6TUsnHrtdF6yH/NkqYMcd93Dy8E00rRDCpGyVkEjKTx7TKNwj9DPopODQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v6-20020a170906338600b00a318bf33270si5621456eja.522.2024.01.31.10.17.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 10:17:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=C6blsveO; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-46962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 711091F21806 for ; Wed, 31 Jan 2024 18:17:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D061131737; Wed, 31 Jan 2024 18:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="C6blsveO" Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA1C212FF78 for ; Wed, 31 Jan 2024 18:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706725030; cv=none; b=iprmBPOAAgl0ePZtsA9AGCCyTtl2iZXrj6B10idsNtsdO5D2VxFY1YRKQ+faugwP/9ojLNrksy24B6DAf+hxNNGYrOKABF5P0yaYf38lohERnOM0Zb+rVRP9zYB4Ncp+Q2/sH09lMir9Ng15pKnri14zHeq9ImiTq+WHCOB6bsA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706725030; c=relaxed/simple; bh=lSL7ZiS6AF8e2f46sDRNj1OPxHM2bdMKamA8rT7qT4k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QhEd3lrBAZx7ofyqh/kjLWm3E08JaqewoOhF+T8/zfmn+y0pPtp0KXOxlJPkRGcIhswfFdzt4j67+g2OY3UVtonh0q00XD8QSIZPQOcDGaaWZScmnC3jdr5/Zi9tEErWW/W+yUOxyuEDbd3YGt1KC83RioHj3domTkKbZBTTORU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=C6blsveO; arc=none smtp.client-ip=209.85.166.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-3638bd37107so5325ab.0 for ; Wed, 31 Jan 2024 10:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706725028; x=1707329828; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cGoGC6xB6KW9odfFn1t46MQGiYGwOCppmvmcxLORiTA=; b=C6blsveO2WU3EpVhI+nfyqpFQvAsUxqYeqyLTZcF6hZYN38oLVTxc922seTevu/+qs 2AEX4ZtyyV4Uatc/PFHzuGBDfAENogo+lheKcQVFCNg2veGhq02LjzG+mWAGKbcYtOF7 W4msDMo3d8qWimVXTZkuD+0VUjMNZ/1svRiz/ITJdh1jZ7le4GK5NgeWR9qVgqX7tFzt A1FhD3duX5G/Ji0vFg9QyFvRYlBwpZbXySPVKZaIwAkRQYY4ZLUDW7a+CR0iZChWhgWx 8NPuPtTN3KRhNgHsRP2pkQcAvGjMeIutlxRhm/DR+8LCJXEegw67rB3zTjhWTVW6vxy2 iSfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706725028; x=1707329828; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cGoGC6xB6KW9odfFn1t46MQGiYGwOCppmvmcxLORiTA=; b=hKCSLui7WVE7V6ZOqIy31bNtuXVuIOyURpELiGvyo+ytLGoMchB7GenpbOP/YPgKU7 JDoRL8gotfpEF8ogVPy7Yv9sou4G+6xcu2Zp+ZDajXcJ6vFO/n7uyYcQ08LnQe+oN8o+ oJPFJewYXrsNKyTVT6GBOYiexC/tbh5VB5wAzVXkw6IPULMXQTVLBtFssiEbeDWm3uTn kcLNyq8n4Pgg4eZI9+nSQXR6DrkGnm6I1QDv3saPmerOupq6YEN0M9CSOzq0lPp8pbeP W3EIhgsf2E/NTy25HQ0aUjUZRQ7HPiyi5JLLxyfByPnwbOBTYgWmuLzqvKLTrjXp5Pjc IRrA== X-Gm-Message-State: AOJu0YzhNeNVj+Yzik3Qzgd0rUw42mqCrNwemybQxZ4wS3fK+bXpBo1Y MhOfCi2h5S8nkiDY8jEZPeML62Ij+9c7HZpNyNolOYhCkfNkskzu6SdgawOqV0fzupr6VZIb7lq ZENsPH1xo8BQw3R9VmBrL9hH4JkSSZs7YwcNE X-Received: by 2002:a92:c9cd:0:b0:363:8388:dbd1 with SMTP id k13-20020a92c9cd000000b003638388dbd1mr15806ilq.16.1706725027987; Wed, 31 Jan 2024 10:17:07 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240121182040.GBZa1geI5NxWSslvt0@fat_crate.local> <20240130220845.1978329-1-kevinloughlin@google.com> <20240131140037.GDZbpShX2b0elXlqDA@fat_crate.local> In-Reply-To: <20240131140037.GDZbpShX2b0elXlqDA@fat_crate.local> From: Jacob Xu Date: Wed, 31 Jan 2024 10:16:55 -0800 Message-ID: Subject: Re: [PATCH v3 0/2] x86: enforce and cleanup RIP-relative accesses in early boot code To: Borislav Petkov Cc: Kevin Loughlin , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Nick Desaulniers , Justin Stitt , Tom Lendacky , Pankaj Gupta , Hou Wenlong , Ard Biesheuvel , Dionna Glaze , Brijesh Singh , Michael Roth , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-coco@lists.linux.dev, Ashish Kalra , Andi Kleen , Adam Dunlap , Peter Gonda , Sidharth Telang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 6:01=E2=80=AFAM Borislav Petkov wrot= e: > > On Tue, Jan 30, 2024 at 10:08:43PM +0000, Kevin Loughlin wrote: > > Instead, this patchset continues the approach of fixing the immediate > > problem of SEV-SNP boots crashing when built by clang, providing a > > backport-friendly set of changes needed to successfully boot SEV-SNP > > hosts and guests. > > What use cases are those exactly? How do I reproduce them here? > We're interested in fixing SEV-SNP guest boots which are currently broken when using a guest kernel compiled with clang. It seems like every other user of SEV/SNP linux kernel code uses GCC to compile the kernel so they've avoided this issue. > SNP is not upstream yet and the SEV* code has been out there for a while > now without a single such report so this must be something new happening > due to ...? E.g. Google COS uses clang to compile the kernel and we've made do with an internal fix for a while. We've unfortunately just been rather slow to report upstream. > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette