Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2266rdh; Wed, 25 Oct 2023 14:10:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6dZP7RF40diUbNkZIsiFhPGPhxT7FOhpV2UjnKBTEp05fEK5FuZkAMKFct2YhE+SufP2z X-Received: by 2002:a25:50c3:0:b0:d9b:417:139c with SMTP id e186-20020a2550c3000000b00d9b0417139cmr15392533ybb.60.1698268252310; Wed, 25 Oct 2023 14:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698268252; cv=none; d=google.com; s=arc-20160816; b=OdVk1j/daeR5IJNfln3qDHOkYdDgOtEls4wS1u11HEqCTg1rQ0nNRJOBwFgx9z2GQK c+30CpaZlIu1jhNO9/s1H8orQXzM0h/l/0V+NuypfO7WClD8dBj4YKoF/XzKgeQniy3c 3KWoIaZ2LXGM139HnAh7cGide/nRiBEVZyIjj92bXLCHxHFtZyeoaHwIPzzUkW/UILGK UZDcDNnmJBNLhbhpTw7jYJZA1vcahIQxscI/HTcdlbwzJ5gMWiyqSbuRplLda/lnw6UI NShsMaHl9ANqA+aeDlUlMY8Ykjel98K7XLncTPUOkjFAzTtWtCtGQJ7mDt3Mem4DTof3 ZXXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :references:cc:to:content-language:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=3hbGAH2u7UanqA7JiF1FSpJgxoOcyqFnHxpWblYWTOA=; fh=Xe/+c4QMt9PJzG7LiOuXlUDyhgsfhdyK+4KMZrQimP0=; b=rouwMDvxyQeR2ZlIQ6HtVQDAR4OfUn9LnI5qw5GvDb3v4B390w3Kk9slzQoPYRr8hq il+qhGOF0wrDsOrALhfV4+NjgVN3FqAmR5y0sEVql6COnfXTGfttNbP6PwE///Ewpqmr QIUbqrWxOEf8j+1d67BkChDTAtFjOcJ+1qeYEqDfP2ZkvFxfl8NiPzJFBt1+Fqf4P5bl ECG7BhuXG1GFFCb7NA8PsB3I7huQRG1kMSk//M0hXDPoSlje2MzKd92tHCI1zg6Xzgjb vLv29znMQg2CWB0HGVJkF987kZtkec0Dgi9x6iiWiLyX1nlu9f/ymfyh7qk5ayaJwMm8 GWNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b=iubvNXY8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w135-20020a25df8d000000b00da04189c6b4si5966651ybg.404.2023.10.25.14.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 14:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b=iubvNXY8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D872581A334B; Wed, 25 Oct 2023 14:10:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbjJYVKs (ORCPT + 99 others); Wed, 25 Oct 2023 17:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjJYVKr (ORCPT ); Wed, 25 Oct 2023 17:10:47 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C49AB133 for ; Wed, 25 Oct 2023 14:10:44 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507a62d4788so251944e87.0 for ; Wed, 25 Oct 2023 14:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1698268243; x=1698873043; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :content-language:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=3hbGAH2u7UanqA7JiF1FSpJgxoOcyqFnHxpWblYWTOA=; b=iubvNXY8JO4iHihgpCiYUOSVhyXQ37cnlE8ygyyJPjV1kn1FPZE7j+3Ofk5lBPEHR1 uaB2wX08K3rXMvPr6kd0W6wNRScNNcVqs5znaXDHRsXi45UJIwlB5k74A2YW+G2XoN37 q8MWNV193XhXgUw/AAtu0xl7Rn2g+BCNj67YY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698268243; x=1698873043; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :content-language:subject:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3hbGAH2u7UanqA7JiF1FSpJgxoOcyqFnHxpWblYWTOA=; b=sr6TePD8MT5NLxWSZDMaDCnJB5Jxc94Oigxay6d5rGYW0q1RSmOY3TIzS/7LPSM/7U 8LyIEoDeOS6PQzVcJYD7I8tmQ8ts2z5R5ZJkE7G6Fn5VEhnCPODi4K0N8S0StAE/ezaL 991mGlv79xvNXRBwGG9DVQrWpQsQQteGDeNDAbpTQIVJhsvlHk1H8jRSTuAgGSJmtomU 9MoYi1jmHSg1CKrbt7Q1ECfDti9Ez4D5vLUDosQ/Px94X/VSWKuX+AAJ6AZlnQlNEeaC P7Ox1RfhbymOf8ZsRlCLWPLypgVIjmFkEma/A/92JU1TXyxzDskZmmbWZWfF5S2xoPBz 9PMQ== X-Gm-Message-State: AOJu0YyZLpYN7qm4gzsCBhILkNHYGOWWGzjVTokj8No/PMC4B6Nd5dUN PL3VTRzMXvt8rnz4WvwSX2d0/Q== X-Received: by 2002:ac2:46c4:0:b0:508:12f4:34dc with SMTP id p4-20020ac246c4000000b0050812f434dcmr3212357lfo.42.1698268242936; Wed, 25 Oct 2023 14:10:42 -0700 (PDT) Received: from [10.80.67.28] (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id fx4-20020a170906b74400b009b9a1714524sm10650205ejb.12.2023.10.25.14.10.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 14:10:42 -0700 (PDT) Message-ID: <8b6d857f-cbf6-4969-8285-f90254bdafc0@citrix.com> Date: Wed, 25 Oct 2023 22:10:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Andrew Cooper Subject: Re: [PATCH v3 1/6] x86/bugs: Add asm helpers for executing VERW Content-Language: en-GB To: Pawan Gupta , 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 Cc: 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 References: <20231025-delay-verw-v3-0-52663677ee35@linux.intel.com> <20231025-delay-verw-v3-1-52663677ee35@linux.intel.com> Autocrypt: addr=andrew.cooper3@citrix.com; keyd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JyDDKN99ziC0Wz5kcPyVD1HNf8bgaqGDzrv3TfYjwqayRFcMf7xJaL9xXedMcAEQEAAcLB XwQYAQgACQUCUuE2fwIbDAAKCRBlw/kGpdefoG4XEACD1Qf/er8EA7g23HMxYWd3FXHThrVQ HgiGdk5Yh632vjOm9L4sd/GCEACVQKjsu98e8o3ysitFlznEns5EAAXEbITrgKWXDDUWGYxd pnjj2u+GkVdsOAGk0kxczX6s+VRBhpbBI2PWnOsRJgU2n10PZ3mZD4Xu9kU2IXYmuW+e5KCA vTArRUdCrAtIa1k01sPipPPw6dfxx2e5asy21YOytzxuWFfJTGnVxZZSCyLUO83sh6OZhJkk b9rxL9wPmpN/t2IPaEKoAc0FTQZS36wAMOXkBh24PQ9gaLJvfPKpNzGD8XWR5HHF0NLIJhgg 4ZlEXQ2fVp3XrtocHqhu4UZR4koCijgB8sB7Tb0GCpwK+C4UePdFLfhKyRdSXuvY3AHJd4CP 4JzW0Bzq/WXY3XMOzUTYApGQpnUpdOmuQSfpV9MQO+/jo7r6yPbxT7CwRS5dcQPzUiuHLK9i nvjREdh84qycnx0/6dDroYhp0DFv4udxuAvt1h4wGwTPRQZerSm4xaYegEFusyhbZrI0U9tJ B8WrhBLXDiYlyJT6zOV2yZFuW47VrLsjYnHwn27hmxTC/7tvG3euCklmkn9Sl9IAKFu29RSo d5bD8kMSCYsTqtTfT6W4A3qHGvIDta3ptLYpIAOD2sY3GYq2nf3Bbzx81wZK14JdDDHUX2Rs 6+ahAA== In-Reply-To: <20231025-delay-verw-v3-1-52663677ee35@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 14:10:51 -0700 (PDT) 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.