Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp80160rwb; Fri, 2 Sep 2022 10:28:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR72MfNDPSLepF+pbS4KzhfV0SXkuEdgx3pgkGKx6Jc89IkKouUTBYdqQumoWSsDV+BWO/z1 X-Received: by 2002:a63:4b65:0:b0:42a:a707:17a5 with SMTP id k37-20020a634b65000000b0042aa70717a5mr32220499pgl.137.1662139730882; Fri, 02 Sep 2022 10:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662139730; cv=none; d=google.com; s=arc-20160816; b=rep1lObqa8U1egul+sgjEtbuOeXPPSlPASowG9dj5SIBLTnEVeWph6OUpyxlbmiK3v Bh+FvAnfzGt611lxCbiyBpxej1TzYc9JVDbr73KbCMBjjMMUfCLfuZL4sR9pK3BD+VoI Q57FDvSUrGUwfwIvrKRFmcTBrCWl1suSkJd61loh+vNqCeVAYEvD0C5VJYd2FcTsUgOh zo7V+hO3xv7NBLgPUSO5ZJYluWV3KV6tHtprBf9/3/JbL7gN4Ys1uXiFaibpmIVlDIO5 WMOYOkzTeIgMQCPh19mqOUtRqr7LL7jMs+TdXZvxe6m94dCGLjcCq0muHk5clzgxuwh1 iRKQ== 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=fkYUhUmO0S6kugiT2LYg3f4F80JAO7Aqk3FfxeycZyQ=; b=aVcGA2WhRQ+cEwraDLUkOsYN4IcRc0GBip1s0Ougou2tUcITn2jhBlzAFp3B/4RSlI gITyzyBMmz13MVZVFnKWi6P2GTnDVjgSRuPzUhBTxXWw5692+BOHEZgMwsP6JqOT62xf C9w2dfnd/DJNU3Smh45RwMTdG09yOKj1H8QG7YDYvMv3M+PqCInFVcCjYqs83cW1KIJW zRD0TgSyUxN8W3wJUjXKR2X/k0jlYPoaYWVEIvhnTa0AY4eSpBGsq/QvJSMsLNmUbvdh 4qQg5LB/spM2jQXnSSzj4OACrBjz/i22kXNV6jBAFr2Tw/DB8SzhCsw/RkDDn7kefN4d utEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RzAY0ghN; 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 e189-20020a6369c6000000b0041be5a0c345si1534335pgc.52.2022.09.02.10.28.39; Fri, 02 Sep 2022 10:28:50 -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=RzAY0ghN; 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 S233448AbiIBREL (ORCPT + 99 others); Fri, 2 Sep 2022 13:04:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232692AbiIBREJ (ORCPT ); Fri, 2 Sep 2022 13:04:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82D77E39A6 for ; Fri, 2 Sep 2022 10:04:04 -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-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fkYUhUmO0S6kugiT2LYg3f4F80JAO7Aqk3FfxeycZyQ=; b=RzAY0ghN61ZZD0c8eB30uj84hN qVcUB7UYAlN8LNn4TaKxa3nt6eqc+NAgtE0rG2fIL73ziPN4OgNMqTZekcpyBpxIqv3KgRKgSBcGE kRyK087cbDkvCx1UxwKjpt6PGUCzRA1BAzZiRURz+Q5L4vK0m/ST0hpjXXwmznifxHioeK4S6NJt/ sKi3WfcqpPGolK6AX4onCc4GLsmQV+iEFh1hdB6/GJlO/Rqj6F44mX2MICIPbIJpxvoLkycWcdeFk vGIwCT35fApWpVt6aIFNL5fleP2cc3CuIts1tL3JLMowMbdbzzqigdKd8uUpmeqYC3SYXxOeiwnbF nYxqB1AA==; 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 1oUA4v-007Bhf-32; Fri, 02 Sep 2022 17:03:37 +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)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id F0B8D3002A3; Fri, 2 Sep 2022 19:03:33 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DEA002022A4CD; Fri, 2 Sep 2022 19:03:33 +0200 (CEST) Date: Fri, 2 Sep 2022 19:03:33 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Steven Rostedt , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , K Prateek Nayak , Eric Dumazet Subject: Re: [PATCH v2 37/59] x86/putuser: Provide room for padding Message-ID: References: <20220902130625.217071627@infradead.org> <20220902130950.205726504@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Fri, Sep 02, 2022 at 09:43:45AM -0700, Linus Torvalds wrote: > So I don't hate this patch and it's probably good for consistency, but > I really think that the retbleed tracking could perhaps be improved to > let this be all unnecessary. > > The whole return stack depth counting is already not 100% exact, and I > think we could just make the rule be that we don't track leaf > functions. > > Why? It's just a off-by-one in the already not exact tracking. And - > perhaps equally importantly - leaf functions are very very common > dynamically, and I suspect it's trivial to see them. > > Yes, yes, you could make objtool even smarter and actually do some > kind of function flow graph thing (and I think some people were > talking about that with the whole ret counting long long ago), but the > leaf function thing is the really simple low-hanging fruit case of > that. So I did the leaf thing a few weeks ago, and at the time the perf gains where not worth the complexity. I can try again :-)