Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1393951rda; Mon, 23 Oct 2023 11:08:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZpKbQYJdKITZdrROiw6oZi5OyIdYKvhq6yw7fR7pufOTcHfZoMSKn/5NMywMmmgflbC+S X-Received: by 2002:a17:90a:195b:b0:27c:f845:3e3f with SMTP id 27-20020a17090a195b00b0027cf8453e3fmr9883213pjh.1.1698084501423; Mon, 23 Oct 2023 11:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698084501; cv=none; d=google.com; s=arc-20160816; b=EZrH/f22+ZrY2gCAUBrnL228yUBxhXboo3dmi1fjt9kyb5a1LdAez9jRjeubDheXoM wGoDlfbhf5QcXmZw9sy6HAccySNq7w4Qy6OKYPgivLOAHYUWnXfBgGOPFmzyirZn5dff QF/jFKOPdef97eFPhuUazKg+OLM8Bhw5+qg5Ir0MZmOsNcH7jx6Tj4RIZosGfEc9ILzt f85pWQ+95QXwKGdsCRrVWd7Qm9lgCW/scUX78X2f6iI4HKDZFiK9oW99VTi8W9ik8EdM jlLlEkJmC75NJdz1vnvE6JmlKgwefHypFCgoBNO8LxSJsF+sRGmVtptukMlGIBrEXYne 3h8Q== 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=n8lUfcRw+54Xvf5i/DGSTsTqXl71IISGcNiaJrxYMVk=; fh=RhAZB8Sz/ObDnfvjWyXMW8Wp1P8VBrZiDLtA48BfTGE=; b=A5U1oq/tzwOwyKDmLQbXEGJaRKAIdDOR0uGpSfKcgVjrbhlQvW9PNgm+vr+qILazWi HZqFhjFP7SFGiTZBlg1obl0piPcqiP4ydDHW0uv3227tqsZXJtV/nKi16xCbt7P61OJB ovzcQ6lppUGaQmF/iCPc1aJDwuTjEOfUvaNT9e9QqlFgmEq1oIA4jlbCi/KCWdB/W7NP zqZuTxMR5CZWSsUaaCah22iIcrMvRVrrpNpx98FQ/kt6yDjHXoODA1GyrXlX/1dSDsjT hM2xflcKTb2tk8+JzyPQNzueqod1BVGWCSNv4yWtSdIGopn+jZteJOj9FNMce4iaS6sT N3Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pfON6swb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l3-20020a17090aaa8300b00274ac850fbbsi9173354pjq.132.2023.10.23.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 11:08:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pfON6swb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 2A1668032C67; Mon, 23 Oct 2023 11:08:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231614AbjJWSIM (ORCPT + 99 others); Mon, 23 Oct 2023 14:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231159AbjJWSIK (ORCPT ); Mon, 23 Oct 2023 14:08:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF14B4; Mon, 23 Oct 2023 11:08:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D54E0C433C8; Mon, 23 Oct 2023 18:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698084488; bh=nIgs0wvJThOXxn7oOFB3LcbF7XBEJd/S1r1uOMhwaUo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pfON6swb831n8aeMwzxjj6xbWsYHljK018mYgGx5xpYQ23ww+ylfFIAnLPz8ARk9a 6T3Ne9hpYee+sflOr8FZhPc5KDP3OD3ouG4DcMWu2TkWyQXi7L1eFcy1H/ixJndj6Z kb0Q9MoK+7JyY/3I3baH153a6h1T9nfa87axTJt4jC4/gvruTx/1/KQh3NXH8WKXZ2 NQLfec/mlk8Sn/vYMYqDBRBNgwAvcBI3nwPtwKHsSDQne1DgG0zpKlnOkWIBD1QD/f wATJITKZwjKP/tDk95E9ZaEpofBlAOUPsTHQFP/If/BVmJ0bW/KMB/nXYTIz8k5DIt /vmkRx8q2Pksg== Date: Mon, 23 Oct 2023 11:08:06 -0700 From: Josh Poimboeuf To: Pawan Gupta Cc: Andrew Cooper , 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: [RESEND][PATCH 1/6] x86/bugs: Add asm helpers for executing VERW Message-ID: <20231023180806.udbnt4nx3r2bdyi3@treble> References: <20231020-delay-verw-v1-0-cff54096326d@linux.intel.com> <20231020-delay-verw-v1-1-cff54096326d@linux.intel.com> <20231021011859.c2rtc4vl7l2cl4q6@desk> <20231021022134.kbey242xq7n754rg@desk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231021022134.kbey242xq7n754rg@desk> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 11:08:19 -0700 (PDT) On Fri, Oct 20, 2023 at 07:21:34PM -0700, Pawan Gupta wrote: > On Sat, Oct 21, 2023 at 02:33:47AM +0100, Andrew Cooper wrote: > > On 21/10/2023 2:18 am, Pawan Gupta wrote: > > > On Sat, Oct 21, 2023 at 12:55:45AM +0100, Andrew Cooper wrote: > > >> Also it avoids playing games with hiding data inside an instruction. > > >> It's a neat trick, but the neater trick is avoid it whenever possible. > > > Thanks for the pointers. I think verw in 32-bit mode won't be able to > > > address the operand outside of 4GB range. > > > > And?  In a 32bit kernel, what lives outside of a 4G range? > > > > > Maybe this is fine or could it > > > be a problem addressing from e.g. KVM module? > > > > RIP-relative addressing is disp32.  Which is the same as it is for > > direct calls. > > > > So if your module is far enough away for VERW to have issues, you've got > > far more basic problems to solve first. > > Sorry, I raised the wrong problem. In 64-bit mode, verww only has 32-bit > of relative addressing, so memory operand has to be within 4GB of > callsite. That could be a constraint. Even on x86-64, modules are mapped within 4GB of the kernel, so I don't think that's a concern. -- Josh