Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1349396rdb; Fri, 20 Oct 2023 16:51:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGznWzUU8rFxcdzXH5wWC4oS38cgzu7TLGGNew0+jYfRJl6FjztUp5VtbhwNDEOe/aaUtTd X-Received: by 2002:a17:90a:1901:b0:27d:2cff:65a1 with SMTP id 1-20020a17090a190100b0027d2cff65a1mr3316971pjg.29.1697845865522; Fri, 20 Oct 2023 16:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697845865; cv=none; d=google.com; s=arc-20160816; b=SznTH5WKqljB1n9WoYd4fBPtedh2kNfSavosa1/WdVKRj4AuJGGkTXIZb7MMzYRTCU 758dwSwSKvOeV/SXK6l8LSHKPmc4Lbq9PsBElOvz/mcntCs/YHzsvUlGY63p48bRVrei rYi/SMaBvoCNrynFknKSnLtoDX2nEnKZxQxCA7vvr6N/Z2YeCsc6jj5WQxfVpJ688iw4 oitg8uCn9uULiX+yULaVMm+ZmLCSgYiXzXuB4tZY5zfjSD8M0g513t8SqhpxQetoYVxp cCZwjID1r6gaWijuAhf1WSQQmFqgDk2hjDNj5owoltp+hejzr8/vPJ1nAFp7F/XBjpJS fYbQ== 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=oZX6xbeZpf9V2UvtE8+sGIGoB+kOlhX5xfkccrtXFH0=; fh=Qt8ZcxnwTToCqoX/wv1/ITwKAGfSqE+HJ+NNU4sp9jI=; b=S9k4Zk5yNjYicidbH+FoBIain/KaGyUuJ5VpAC9i9TXbECdyHIWvwzv2OCT8ETWw3+ Oq256IbynLYUx4zjQiDsGb+dbDGiW5W3DAUoU/cZ0h07B4PifCPCad27ufv5Cm13ZEpG hJrWxO1qGFeG8Keq8sALof0HCKRgjV5EtyEz2IuLOpnjPgTElTBe7EKsBtPyRpgLSOtL bPihHKE+HgsIpE+US6KqPiAjUNjOXUcel0LP5me3jeDgB6ekqQS+pUg20BnhpQBkKONw TnnQo6VLq7WpBgyldRHrNWRPG44IXdip/GmSEkrP/qZdZLA6kofuzFP2nH0G9Gg8Unxy o3Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ja1Mh8BT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005b74de09ee0si2755710pgb.108.2023.10.20.16.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 16:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ja1Mh8BT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A5C6583B2E4D; Fri, 20 Oct 2023 16:50:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbjJTXt4 (ORCPT + 99 others); Fri, 20 Oct 2023 19:49:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjJTXtz (ORCPT ); Fri, 20 Oct 2023 19:49:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D019010CA; Fri, 20 Oct 2023 16:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697845781; x=1729381781; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=sUVfTo3lntITx/vLDxRaXJpf3T8h1tdB1hdFMPw4iHA=; b=Ja1Mh8BTYYoWirSph/H2mmVe1NkbNukdFVYhY74IL8OxC1GcnKoOC2dw UWo4aCWAgYrT5echBeOrbIUOaCVdp/TFGDLbqwdQtd8BxrTifnBFY8X5q a0uDHRk27edY7GjCf8X2T+05xkp+eWPBEFVoOEQ0hE6KMnZYyATi7u39q DhLcrAQ/rBhmjqLBi2Ek0RkAduAtJAnNGxBFqVCVsjE7GTTpbPH4svxMH m+TCSfVK099HXoyCyfhOOeiVBwuSJSdC2aT3RsupxSAob8/Vwr6qQ0LLA x3VnuX8IuNNQ03lykieIFVKYMCXgY1tRff2oTLpHrgDKixfy8/9GV9jcU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="389446278" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="389446278" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 16:49:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="707373792" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="707373792" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 16:49:40 -0700 Date: Fri, 20 Oct 2023 16:49:34 -0700 From: Andi Kleen To: Pawan Gupta Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Andy Lutomirski , Jonathan Corbet , Sean Christopherson , Paolo Bonzini , tony.luck@intel.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Alyssa Milburn , Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com Subject: Re: [PATCH 3/6] x86/entry_32: Add VERW just before userspace transition Message-ID: References: <20231020-delay-verw-v1-0-cff54096326d@linux.intel.com> <20231020-delay-verw-v1-3-cff54096326d@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231020-delay-verw-v1-3-cff54096326d@linux.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 16:50:35 -0700 (PDT) On Fri, Oct 20, 2023 at 01:45:09PM -0700, Pawan Gupta wrote: > As done for entry_64, add support for executing VERW late in exit to > user path for 32-bit mode. > > Signed-off-by: Pawan Gupta > --- > arch/x86/entry/entry_32.S | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S > index 6e6af42e044a..bbf77d2aab2e 100644 > --- a/arch/x86/entry/entry_32.S > +++ b/arch/x86/entry/entry_32.S > @@ -886,6 +886,9 @@ SYM_FUNC_START(entry_SYSENTER_32) > popfl > popl %eax > > + /* Mitigate CPU data sampling attacks .e.g. MDS */ > + USER_CLEAR_CPU_BUFFERS > + > /* > * Return back to the vDSO, which will pop ecx and edx. > * Don't bother with DS and ES (they already contain __USER_DS). Did you forget the INT 0x80 entry point? -Andi