Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2632128rda; Wed, 25 Oct 2023 08:09:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErW+kdGTu/+keN+/WiP+abl7o67Q7b9M0OrxlBha6XcL/91V2078dKu4PI0EUQNrGGJsuy X-Received: by 2002:ac8:5d44:0:b0:41c:d8f6:54a1 with SMTP id g4-20020ac85d44000000b0041cd8f654a1mr19941684qtx.60.1698246579577; Wed, 25 Oct 2023 08:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698246579; cv=none; d=google.com; s=arc-20160816; b=zJdMzZ/EczsUfs4SjAAsPbdswyus3Gqh30hbSPpb/CnCbKNOlSQvaDZbswpscqlfj3 bcY5dCBtds54vqxG47REQV1BhbBnjef+4s6JH+vqecJ7RPhO/PRU6aJBHpPD3Jz86am/ 3OPqs/5fGMuoIigsukPot+7A0H0RYgYHEHt/Y2RHhHV4YQU9tvCpF5ZezulP8qwIBG4E 9dslQADMCGGTWfYsRCCy/u14SC9QaXwzeNSsueuQcBpt/Y5qJ8ZdJC29VDJHfMYAXX/F MrkM/wTs0JIisynhOtrKqW/qv23VxGhpjUCXNF7ZZrhxf5nkmSoJl/1tZ2io5Baaooe3 c3oA== 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=iBS6IRksGxGlnB4HzI+sizY0JmNUDGRjME9akpZVtr0=; fh=q22FrE+3HPFqgIfGSDy85ckjMt4+7YeUp/9thyDx+2k=; b=Y/WY4SPL6vXYquWqXd1cKzOhpzPxbTi0JXq0LCKTmKWc8dOMEV4nqOha4+iu7GXMxj Me4dagXxHifk3I1FoOFEW0rhxug0Mec8nTxJhdMiI1VQTRk62zdNFLXnRDKt+JYiZnmD e7hEcpP2Vt5J9owXocVkCfc7odEO++2RbP4hPsRQ2hBgYA7loGZSNCxzLkBXbSA8S5Ux Y0q91/TMGHFzTuxwf/DRmQ4wkM5sIrwBbjX2MIk9+17XlsXQ2SD9bALfBT97OYb8Rjvw gWfWB8/Tu/F5TTn0bJuqKcoLlsyWM65nnIyzeU2kVpzjH9mRtfdJUgCA9aeCekbdOmWH UGUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DRVNj3VW; 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=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f3-20020ac87f03000000b004035dadf9f5si8156574qtk.700.2023.10.25.08.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:09:39 -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=@intel.com header.s=Intel header.b=DRVNj3VW; 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=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A74F68097155; Wed, 25 Oct 2023 08:09:35 -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 S234655AbjJYPJZ (ORCPT + 99 others); Wed, 25 Oct 2023 11:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbjJYPJY (ORCPT ); Wed, 25 Oct 2023 11:09:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D0EB131; Wed, 25 Oct 2023 08:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698246561; x=1729782561; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SEr5aW4KGi57nsWBOgqXVfaiVNBRpUeXtWwmjagDtZY=; b=DRVNj3VW+0YeyQQMwX4HFXTvWHNNfiwGY0kVBK/cHO5LA6opu8D6R2Kp GHzCazQABsjyl9Uy+SlXzv3l/5vyXMleVspPJ7XsX6d4ewz70Z7CXX9Ib Yresbl8k/HWpgm0RfO5av2qL6qR7+TwE9LXjBcoc+MSw15sg/YXVsUmnH CcgWh9HuxOX++lqIGABA3rbhcMRF8eMyTQymHfsr9Wj8Np6mD2e1/wwD1 DaNQMMDD3VoUMnqplYggjhTD+lX3LeCBZ2MgEgf6zKwuJVfp4IoxFwFPR Zy7cs/WHsrLEOTjSPUivKWUKTIT8xEDdf/GNlagn2EAIBptZK8mCCGfxH A==; X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="451555068" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="451555068" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 08:06:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="111864" Received: from mhans-mobl3.amr.corp.intel.com (HELO desk) ([10.252.132.200]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 08:06:20 -0700 Date: Wed, 25 Oct 2023 08:06:44 -0700 From: Pawan Gupta To: Peter Zijlstra Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , 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, Alyssa Milburn Subject: Re: [PATCH v2 1/6] x86/bugs: Add asm helpers for executing VERW Message-ID: <20231025150644.xckrfxcr2vxcqvun@desk> References: <20231024-delay-verw-v2-0-f1881340c807@linux.intel.com> <20231024-delay-verw-v2-1-f1881340c807@linux.intel.com> <20231024103601.GH31411@noisy.programming.kicks-ass.net> <20231025040029.uglv4dwmlnfhcjde@desk> <20231025065610.GA31201@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231025065610.GA31201@noisy.programming.kicks-ass.net> 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 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]); Wed, 25 Oct 2023 08:09:35 -0700 (PDT) On Wed, Oct 25, 2023 at 08:56:10AM +0200, Peter Zijlstra wrote: > > config3: 32-bit mode, pre-boot objdump > > > > entry_SYSENTER_32: > > ... > > c8e: 58 pop %eax > > c8f: 90 nop > > c90: 90 nop > > c91: 90 nop > > c92: 90 nop > > c93: 90 nop > > c94: 90 nop > > c95: 90 nop > > c96: fb sti > > c97: 0f 35 sysexit > > > > If you look at arch/x86/include/asm/nops.h, you'll find (for 32bit): > > * 7: leal 0x0(%esi,%eiz,1),%esi > > Which reads as: > > load-effective-address of %esi[0] into %esi Wow, never imagined that this would be one of the magician's trick. I will go read on why is it better than NOPL.