Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp11383rdh; Wed, 25 Oct 2023 14:28:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvHvEnuF7UlNUVqjrvGw/6T6V5o2ADAf0qlKndrQUjhP+gQRgwO6wQT+WtF1BjiqvQ6V/6 X-Received: by 2002:a25:4dc2:0:b0:d78:26a0:ab8b with SMTP id a185-20020a254dc2000000b00d7826a0ab8bmr15769883ybb.55.1698269317297; Wed, 25 Oct 2023 14:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698269317; cv=none; d=google.com; s=arc-20160816; b=t/vJ9MvQETJNWviMJEeNzlBTAPtsfOMEcnxt7UrwBZB547gYbnD5ePkXHlTGX10BeR pRnAGsYnXziiLSZvSOQULGJ5baQQIx/Tc6SkkdxIqSZ6WRBLOj9OCIdjcHNTiOvlUT3z NO6nFw5TjpoxKQUszPjaydkHtgy027g41Tb+OjlLtdfK6l3Nm02jVGBzTasMmJlZ4rt5 UiFPgE1uNEnMr0BNsutUxABGHXtDkCuaMLlL7fzcir5/dX1eeyIHWr6S2SB4SmiFfuHn pI3dtVZnAFvBOhocmy+M7FV/+SiJQk6XMIYMOjGTvYvdxEy/OUqiWxUfDkDt6ZhrMd1I ENbA== 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=/ZJ9pVt3ZAyExKbmhCurvNmhvUSXALDow05HJ8pqUyM=; fh=xElMBGngjraJblePx7+NUCvWisFb+mHTLa7DSDMeEqc=; b=hpE080zUqfP8YsI/cI4xbdKObvJXt30lrqdXMXC7A12gNgZHxYGLjIrjj5KlUdJJGs jnwqSvpYmImYH2PF9qSxwDcTVz/Yz8Zy8eCMb7/hw/wjDLCZLY7Wq+kINaPl44l2EmiL 7ku8q2hwj16eL5zTmSc70CcFmzTXFofv+uqO0O0MArX1b56GPNi7NUWeuXsVwAHXzZTX pA0JgCJbeaTdZRiog3JiNsZAkEjxbCIfBOleycIsq6bYoawdlQD+Lqv5OyOcOGMjN7wg 0nwivSGzfhpkRvL0mkjmsHBlK/cRVvnRr5B1lvcVeJYnZU/R6n8IgXZ+xNCVZgdx+/S+ uOSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=imty5sGi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x67-20020a25a049000000b00d9acd9b2088si11655118ybh.620.2023.10.25.14.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 14:28:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=imty5sGi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id BDD228181BA9; Wed, 25 Oct 2023 14:28:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbjJYV2M (ORCPT + 99 others); Wed, 25 Oct 2023 17:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjJYV2L (ORCPT ); Wed, 25 Oct 2023 17:28:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C350136; Wed, 25 Oct 2023 14:28:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26E30C433C8; Wed, 25 Oct 2023 21:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698269289; bh=z3QQjRLSPMK5zGX/5qNvYvsZV/S9Sq7ccMnJNPKjBYM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=imty5sGi4tVZyJnrWC/kRU003stQFsLur3833DsGUz8zBdx2WxOAUSRogSsJsDex6 aJKftFNE6qCEXVffu660pOoTkeezQXbhda07fIAF3EliRY12wsfRPVwSJvTbNJFb8t fe72VrA1GZjPOy4W/Uj1LKet9Ha/MjoCSakkepZo3/QezWh9FFpS8bZZIkS68504s7 Pdh4QCIQQVdJmmBSBdwpcdbP3FvstW1YFmiIgwg8yIcutsvegJMvG7QwUdgrBxADeH MkNVoVc1EVnoqtTfV5ZHP8OozxwCGlT4UeHNEMrsAbpphHbXTQt5jYljEXoaEh4Oyp 91a2nDZ/2+8aQ== Date: Wed, 25 Oct 2023 14:28:06 -0700 From: Josh Poimboeuf To: Andrew Cooper Cc: Pawan Gupta , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , 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, Alyssa Milburn Subject: Re: [PATCH v3 1/6] x86/bugs: Add asm helpers for executing VERW Message-ID: <20231025212806.pgykrxzcmbhrhix5@treble> References: <20231025-delay-verw-v3-0-52663677ee35@linux.intel.com> <20231025-delay-verw-v3-1-52663677ee35@linux.intel.com> <8b6d857f-cbf6-4969-8285-f90254bdafc0@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8b6d857f-cbf6-4969-8285-f90254bdafc0@citrix.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 14:28:34 -0700 (PDT) On Wed, Oct 25, 2023 at 10:10:41PM +0100, Andrew Cooper wrote: > On 25/10/2023 9:52 pm, Pawan Gupta wrote: > > diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S > > index bfb7bcb362bc..f8ba0c0b6e60 100644 > > --- a/arch/x86/entry/entry.S > > +++ b/arch/x86/entry/entry.S > > @@ -20,3 +23,16 @@ SYM_FUNC_END(entry_ibpb) > > EXPORT_SYMBOL_GPL(entry_ibpb); > > > > .popsection > > + > > +.pushsection .entry.text, "ax" > > + > > +.align L1_CACHE_BYTES, 0xcc > > +SYM_CODE_START_NOALIGN(mds_verw_sel) > > + UNWIND_HINT_UNDEFINED > > + ANNOTATE_NOENDBR > > + .word __KERNEL_DS > > You need another .align here.  Otherwise subsequent code will still > start in this cacheline and defeat the purpose of trying to keep it > separate. > > > +SYM_CODE_END(mds_verw_sel); > > Thinking about it, should this really be CODE and not a data entry? > > It lives in .entry.text but it really is data and objtool shouldn't be > writing ORC data for it at all. > > (Not to mention that if it's marked as STT_OBJECT, objdump -d will do > the sensible thing and not even try to disassemble it). > > ~Andrew > > P.S. Please CC on the full series.  Far less effort than fishing the > rest off lore. +1 to putting it in .rodata or so. -- Josh