From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FF03C433EF for ; Mon, 18 Oct 2021 19:37:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E353460E0B for ; Mon, 18 Oct 2021 19:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232659AbhJRTjS (ORCPT ); Mon, 18 Oct 2021 15:39:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231542AbhJRTjQ (ORCPT ); Mon, 18 Oct 2021 15:39:16 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A80BC06161C; Mon, 18 Oct 2021 12:37:05 -0700 (PDT) Received: from zn.tnic (p200300ec2f085700af6a7a3215758573.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:5700:af6a:7a32:1575:8573]) (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 98A2F1EC04A9; Mon, 18 Oct 2021 21:37:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1634585823; 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=E/uKBTWke5UW0bUBb2EBl2Aml26+VGEAZuawTlCp+4Q=; b=aWzc8Jik5Gn0fKiVZtRMmEqBXF1zDeih6+2kRwwDVvBmf5zj75XXu9dsb9yZDZNFRzIvKa aR3cgh7pwxtPgSdTNfjG/cVj7v9Jx+/AQUQb3nY3/MnOBKaquplZg2Y+oUtOOinU+xs2Y4 IN9pbxm60qqOWYhwlBg7c1ddlz8QJ9o= Date: Mon, 18 Oct 2021 21:37:07 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Jane Malalane , LKML , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Pu Wen , Paolo Bonzini , Peter Zijlstra , Andrew Cooper , Yazen Ghannam , Brijesh Singh , Huang Rui , Andy Lutomirski , Kim Phillips , stable@vger.kernel.org Subject: Re: [PATCH v2] x86/cpu: Fix migration safety with X86_BUG_NULL_SEL Message-ID: References: <20211013142230.10129-1-jane.malalane@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 18, 2021 at 07:29:41PM +0000, Sean Christopherson wrote: > This isn't correct. When running as a guest, the intended behavior is to fully > trust the CPUID.0x80000021 bit. Really? Because I'm coming from an SEV-SNP mail thread where we don't trust the HV at all and we even hand in a CPUID page into the guest... :-P > If bit 6 is set, yay, the hypervisor has told the kernel that it > will only ever run on hardware without the bug. If bit 6 is clear > and HYPERVISOR is true, then the FMS crud can't be trusted because > the kernel _may_ run on affected hardware in the future even if the > current underlying hardware is not affected. Ok, I see, then the CPUID check needs to go first, makes sense. > I agree. If the argument for this patch is that the kernel can be migrated to > older hardware, then it stands to reason that the kernel could also be migrated > to a different CPU vendor entirely. E.g. start on Intel, migrate to Zen1, kaboom. Migration across vendors? Really, that works? I'll believe it only when I see it with my own eyes. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette