Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp678416rdh; Thu, 26 Oct 2023 12:30:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFf95lGKuieyOcjSjynaZYsueO6F7Ak7SHkywVb+6DgS9gQvZ6JIzgz05Ogk4xqsS6mTjw7 X-Received: by 2002:a05:622a:553:b0:412:2dd3:e0f3 with SMTP id m19-20020a05622a055300b004122dd3e0f3mr4384576qtx.6.1698348626960; Thu, 26 Oct 2023 12:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698348626; cv=none; d=google.com; s=arc-20160816; b=d4URUfzXIUk31zwjrkyvp/+A7EseqCEQB7tne7XDbzX1rOw0l1iZGgB+V9H3m7ORkQ /X8hJewwQkP4jtc0HrqMeWwyyrEV6yj2p0XeXEVEalzEnI1jSZ/V+sKXVB4NBmbks1Wp bEdn+cDWMTNdghrlObRKgPS7ZaNp16nfCV4gGqLE+pS9pBMOFUufNWWdZFlrTBPsRPDh CcjxUvZ23lOKhHg5teuA1y+S7pTh7Yrb4Al2q074Aj91QcAedn4s0LClEaELOWO8Lyyj R/tnM4WfWIgpf9NmaeP2LUsrSpsx4jyMdX+bVkdGoT3sZVuImwHSBWIGhk1RTKEsEBmi bFOw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZVmarBp6DvbTxJQaMaDR2a0nSDZuQ5kOe9kMc3RZgNw=; fh=6A91I7uyOKgQfzo8veLPxdpFkeaz6Yu6cOQ6tLfvXdQ=; b=FOx/v2962WnvDlz1YxpJgxfyxO/vDEJV0qKfw/IFXw4Dvrlv6GeC6E2DhO/MJM42YU Oa+nPNTyN+bSevWgGUIVZyOxq62BkF5L5xGlf2sBzT4/5Xh/vAKvU86dvHSIQ/t1c32y PuPq6YLMQs4yoVLBgzYDROrKIkV1JKI0smFrk880GmA5nsb6Xav0fNVIMGy3Y3I6AZKG vTpe2MEbmmlwdhgsizp6euEA3CRRUZSNo5RAdhbs1sCoGY+yU9yadFAPlz7qAFgJhZGu WVabLptm4VELqK0gzdskFXugrhcssobzKe3kDDzM8pCRzKaH5/GOopBV940/M+GhY3bX b6xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lvB9t1jT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y13-20020a05622a120d00b0041cd183c283si11688qtx.803.2023.10.26.12.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 12:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lvB9t1jT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 1766583C3F7D; Thu, 26 Oct 2023 12:30:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjJZT34 (ORCPT + 99 others); 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> 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 26 Oct 2023 12:30:06 -0700 (PDT) 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.