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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5AF9C25B48 for ; Thu, 26 Oct 2023 19:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231409AbjJZT34 (ORCPT ); Thu, 26 Oct 2023 15:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjJZT3z (ORCPT ); Thu, 26 Oct 2023 15:29:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DFAE12A; Thu, 26 Oct 2023 12:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698348593; x=1729884593; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=UCuF++K/DRoYTSz+IUQsOAUxD4trrlqrqUJab+FeXUc=; b=lvB9t1jTzntGOLg5FsK4AcCwwoZKKAlW39xA6KwLArqpWxF0PAb8g9ky BMrU467sV+5dLK/5O2qhWDTaZZJevIXswOyvn5dpVQB9hs4RROPF+yWid Ug5cFjTOFhw9fLcdKvHZvHxcjPHRjvMTn3wJBIG2YPjEPxgEx2UKP5spq OQEA2V243vxWfV2tiBtMBnGG7oizYWFGuiqNtphH/pEICe/mkktRakZzV xVA20KsyE4dbJC5Yd3K1eW+Kg/ojxoOU4/Wo9NSJ7ooxgPn3wwldUmFvP HIfEYR2OcZ9p+YeDFICXsWQ2C2QCH1FNtZGNZfvCFTxuW6/Pxfm7S1xpw Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="425274" X-IronPort-AV: E=Sophos;i="6.03,254,1694761200"; d="scan'208";a="425274" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 12:29:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="752860578" X-IronPort-AV: E=Sophos;i="6.03,254,1694761200"; d="scan'208";a="752860578" Received: from paseron-mobl4.amr.corp.intel.com (HELO desk) ([10.209.17.113]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 12:29:51 -0700 Date: Thu, 26 Oct 2023 12:29:50 -0700 From: Pawan Gupta To: Nikolay Borisov 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, ak@linux.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, Dave Hansen Subject: Re: [PATCH v3 2/6] x86/entry_64: Add VERW just before userspace transition Message-ID: <20231026192950.ylzc66f3f5naqvjv@desk> References: <20231025-delay-verw-v3-0-52663677ee35@linux.intel.com> <20231025-delay-verw-v3-2-52663677ee35@linux.intel.com> <2cda7e85-aa75-4257-864d-0092b3339e0e@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2cda7e85-aa75-4257-864d-0092b3339e0e@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 26, 2023 at 07:25:27PM +0300, Nikolay Borisov wrote: > > > On 25.10.23 г. 23:52 ч., Pawan Gupta wrote: > > > > > @@ -1520,6 +1530,7 @@ SYM_CODE_START(ignore_sysret) > > UNWIND_HINT_END_OF_STACK > > ENDBR > > mov $-ENOSYS, %eax > > + CLEAR_CPU_BUFFERS > > nit: Just out of curiosity is it really needed in this case or it's doesn > for the sake of uniformity so that all ring3 transitions are indeed > covered?? Interrupts returning to kernel don't clear the CPU buffers. I believe interrupts will be enabled here, and getting an interrupt here could leak the data that interrupt touched.