Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4116154rwe; Tue, 30 Aug 2022 05:04:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR71U7ZsfRtzQEklqynka9jwatuyec2vwkJ24Jhv5GFG/QQ3F4b9dCb+Ku1BwlQwZ1y7T2hp X-Received: by 2002:a63:d54b:0:b0:42c:299e:255 with SMTP id v11-20020a63d54b000000b0042c299e0255mr7467638pgi.282.1661861086566; Tue, 30 Aug 2022 05:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661861086; cv=none; d=google.com; s=arc-20160816; b=lo5+slpxxsr1hTKtW55b6TAQTf/yk0rkn9xbDBRB6IX5WikFxuv752x2Z9I8DKiT0c LpYEe/ReQ7H36RNhPAeTptkFqTiIL7zjVEsPeH+if1daUgHeTQaIx41CAEGiK3uBwdeS k15Smx7Bl3OcMis3S18WDXkXUAVoquVRD5w25euyB82qJsZVdzYTFXLWp9J/FPy5vrgG QhO6zPaGCu83wuPFmaB4T72cCilqt+hwC+xpGr1Tq+Gnc8WtJTStgZdheCYbE9ENF0aq pELw1bgKW/bAN+aVS0pAppnxST172UqwM5L5o6JR0DOdI4wvGedaZ6slwkWlA/Qh6shq 6Kuw== 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=PdmZTpzthURRizUZ4JSn2ogictuJkmVakktejwJD/dQ=; b=cL418otpJbAl4N7kubicnCvsar3ybE6EtYVN4KPwMPqnHoC1UVjGQFmUwveTdCkjhh wkW76I6fTWqWehqpx0mpTOuZrfmv8UKpnOLmAML8hlu+t5NM/Sia4nacd72CqHeYAR+z JHVxomVPf4PnJej6R+MbxDg/p1qYysSxUh1L3epLsPIUi8hDXSOI7aVLqRmHGgsEseKp X6kUpe0gl3LvzyFx+3L7gwiROKrlWmhoRG0nS1y5oSWm5iHfciCDwmnOUnFWSoDMe0x7 rvVdt91O4ujojMMjXVJA7FCJfbyHGKkCsA+8EkakqK6z5yKUhfCS57FMJ9U5rx00QW3c B07A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H5ll5BMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020a633103000000b0042b828bf15bsi1968081pgx.287.2022.08.30.05.04.35; Tue, 30 Aug 2022 05:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H5ll5BMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbiH3MAc (ORCPT + 99 others); Tue, 30 Aug 2022 08:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiH3MAb (ORCPT ); Tue, 30 Aug 2022 08:00:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF403AE6F; Tue, 30 Aug 2022 05:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=PdmZTpzthURRizUZ4JSn2ogictuJkmVakktejwJD/dQ=; b=H5ll5BMZRJfCXUcTYrh+kk5imH irP4h4IRToGvqnj3tgPuUzjoGOrUWYO4ranhLM75kFZII7bOXd+wQifv6AGa3BxVGVQp/POexa0VH F50M0M8yF3UVFAEzV0UlWIJThz1fdukyAkqmoRNgpwxqR3MKuBwDGPZsB755z9wqbIJNflV3TEz42 IpannB3sI0keaI9cLYY9Q+ye6kI2fYO71YwRpuPBOWLZtIKUij7DvODCrlhzSjXN+pS44iWcXFAkY 7JipoQOweYAJyJ/wZ8wN+P2ZGlQpZW5nlG1x6s6hIu0oFEMemiu9QN23P3ZIg4JrbjLeKFhz52wCB 2VtuvuyQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSzuX-0040Ca-Lk; Tue, 30 Aug 2022 12:00:05 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E11A330031D; Tue, 30 Aug 2022 14:00:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BF6C720A3C659; Tue, 30 Aug 2022 14:00:02 +0200 (CEST) Date: Tue, 30 Aug 2022 14:00:02 +0200 From: Peter Zijlstra To: =?iso-8859-1?Q?Martin-=C9ric?= Racine Cc: Ben Hutchings , x86@kernel.org, Linux Kernel Mailing List , 1017425@bugs.debian.org, stable@vger.kernel.org, regressions@lists.linux.dev, Daniel Sneddon , Pawan Gupta Subject: Re: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it Message-ID: References: <9395338630e3313c1bf0393ae507925d1f9af870.camel@decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Aug 30, 2022 at 02:42:04PM +0300, Martin-?ric Racine wrote: > Greetings, > > On Fri, Aug 19, 2022 at 3:15 PM Peter Zijlstra wrote: > > > > On Fri, Aug 19, 2022 at 01:38:27PM +0200, Ben Hutchings wrote: > > > > > So that puts the whole __FILL_RETURN_BUFFER inside an alternative, and > > > we can't have nested alternatives. That's unfortunate. > > > > Well, both alternatives end with the LFENCE instruction, so I could pull > > it out and do two consequtive ALTs, but unrolling the loop for i386 is > > a better solution in that the sequence, while larger, removes the need > > for the LFENCE. > > Have we reached a definitive conclusion on to how to fix this? https://git.kernel.org/tip/332924973725e8cdcc783c175f68cf7e162cb9e5