Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4177658pxb; Tue, 17 Nov 2020 13:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxe0VI40gtmk6YL7TgoAuhzNBK+igOzhkRqA3IydJ/nVMrdSiXk+FBc68NezIq2aiPhDAFe X-Received: by 2002:a17:906:f247:: with SMTP id gy7mr21394833ejb.48.1605648526711; Tue, 17 Nov 2020 13:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605648526; cv=none; d=google.com; s=arc-20160816; b=L05DM9c9yIvaDojeffjdP9YaMHVKA3JZ0iTtQqw6vAajqS7cYNrqzD/9U3RcmHRHBh no2CWlIgExMY9uztGSFavTtgVUbhhpspI2GY9JiU9v1K1dgCUJ6YoiMdlRsfuBZJMyp/ XxcZT3HUn6v7wMGN+T+v8HrDh7h+PF9XRk0pVl9aNjtGM2S+h/Wh+IiFJHhz0qiAMa+n GKrTAZKbCC0+IlXWpxS/zAW+xd7MWO69PR2/NFPYWp/U4iKtFViymU2m9waoEByPBJgX EkzGi7uu1gnDK1RKTbQ7Gh+Jdqd/qMeNTCcMlP4qY8ohsrXCUUwk6lEXWF6CHczagmRa DNBQ== 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=x3UrhrGPN+9oncUVOMwc/Shd/swOmOyRSPQXEE/TNBQ=; b=wUr+YyqTfVSElNIKHU80mgYsF8KZtcBKOh0bm4cnNGn/PN+4JP3EwiYHWl1HyofT4s TGvucRqt60WOwZIXVIm56qW7IbkqBhAg1i8gRq8vPOQLoc/77eim+wjwJNO6z3Ji9L2K M/bK/sXHldfEmNi52hkbF53fJ8QEtTYWuVirAZcbaO8ECkMrlS2PNsc2xlvZcCEZQwKy W0Tazm74eSQWfkT99t0FPTlNt36MUDaA3QjND7GzKRaHQjJ2VEta9cs91rzt8QCcsZRY /a4s/xb1Ysldkp77BgAuOYjDzLp4yOIeYoXiJGwFjhvPpPqHWTkohlB7Ljpnk/Fok9dl 8ILg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="XyoG9BG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 e20si14570873edq.501.2020.11.17.13.28.23; Tue, 17 Nov 2020 13:28:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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="XyoG9BG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726487AbgKQVXJ (ORCPT + 99 others); Tue, 17 Nov 2020 16:23:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgKQVXI (ORCPT ); Tue, 17 Nov 2020 16:23:08 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93510C0613CF for ; Tue, 17 Nov 2020 13:23:08 -0800 (PST) Received: from zn.tnic (p200300ec2f10130053cbbcbd889a5460.dip0.t-ipconnect.de [IPv6:2003:ec:2f10:1300:53cb:bcbd:889a:5460]) (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 18FBB1EC04B9; Tue, 17 Nov 2020 22:23:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1605648187; 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=x3UrhrGPN+9oncUVOMwc/Shd/swOmOyRSPQXEE/TNBQ=; b=XyoG9BG/jFuearKcQWJ0aiGMPi4DrwtL5zuLUFrj/QvDyLa9LTx1gMcplrtlhPf4CRXNBH B3GaIGqbSTV+BOABUF9upfD333uTHSu+SM0CSdMl4E3O8qYTAMwY5BAsvte6dSl6RYct2i AKrzJ1N7TmpL5oyldjXcv9+RxpLySUw= Date: Tue, 17 Nov 2020 22:23:07 +0100 From: Borislav Petkov To: Alexandre Chartre Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, thomas.lendacky@amd.com, jroedel@suse.de, konrad.wilk@oracle.com, jan.setjeeilers@oracle.com, junaids@google.com, oweisse@google.com, rppt@linux.vnet.ibm.com, graf@amazon.de, mgross@linux.intel.com, kuzuno@gmail.com Subject: Re: [RFC][PATCH v2 00/21] x86/pti: Defer CR3 switch to C code Message-ID: <20201117212307.GR5719@zn.tnic> References: <20201116144757.1920077-1-alexandre.chartre@oracle.com> <20201116201711.GE1131@zn.tnic> <44a88648-738a-4a4b-9c25-6b70000e037c@oracle.com> <20201117165539.GG5719@zn.tnic> <890f6b7e-a268-2257-edcb-5eacc7db3d8e@oracle.com> <20201117182809.GK5719@zn.tnic> <33a1c6ee-0122-0b0c-ed2d-1578b29ef7c1@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <33a1c6ee-0122-0b0c-ed2d-1578b29ef7c1@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 08:02:51PM +0100, Alexandre Chartre wrote: > No. This prevents the guest VM from gathering data from the host > kernel on the same cpu-thread. But there's no mitigation for a guest > VM running on a cpu-thread attacking another cpu-thread (which can be > running another guest VM or the host kernel) from the same cpu-core. > You cannot use flush/clear barriers because the two cpu-threads are > running in parallel. Now there's your justification for why you're doing this. It took a while... The "why" should always be part of the 0th message to provide reviewers/maintainers with answers to the question, what this pile of patches is all about. Please always add this rationale to your patchset in the future. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette