Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2225710pxp; Mon, 21 Mar 2022 14:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv89obGSI671LPwA9WWnwif/mlD1JQ0mSWgloVxFsE8FoPMrdb8AuQX+GrDV6B3tgQwolR X-Received: by 2002:a17:90b:1b4f:b0:1c6:d91b:9d0 with SMTP id nv15-20020a17090b1b4f00b001c6d91b09d0mr1184806pjb.72.1647897553372; Mon, 21 Mar 2022 14:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647897553; cv=none; d=google.com; s=arc-20160816; b=AhqjIWQ4pcKw9K7/9gCB5FjnI6xWYL86dwlOFW5BLa9+AQB1nkQSEuXEBxdE2JOn/l Q6021LSHPIEPIE4Sjr6ejdx5IITqC3jWyuWix0d3rhhVmEOA8HBWLYMZAz98hOGa1O0o n9UrPGcuWqXISD2l34l+g0QsDcq9nwbo3tDJymV/Hpa9LVbDMw9YlYGciSYKxQcX0BsU drcOamfZu6RJDNF/QrpA8Bds0gBk6bun+IZi8mO8RxZOTMLGWQAduakPHpZNMd8QiBzW punb+F3rXKaXNA0EWtxC0crLySwKvi3Q8hlzDj/AsaJWsrTV4sZRSUApJ7tNVctpth5n ncyQ== 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=1alXXCG8SsafVFyYpDrzAC/fb1eFuk40wMrMnE1w1g4=; b=DnpNVZlG6TqvOLDF89qthX6ThOx3S72+2VhKqfZ+dX8tiFfhkDg83/ho4P0Nfv959T Qvi9poQI4yFXfm19kwsUQuwPhfyD572qE/c6AwQiutqQahgToDj8IRiLeRrtvrvXeY0H p6a70nyM6qjDvcsX0Fxc+iXazoAG7PcaQb/QeoseV+TP7wIbCddMJMcyPjZ4modsBLdL UMreV4qooCHotCi5//H8FgjQT7D6phPNFe/Twx49iZcBprWddtWjq7t8bW8+Y6yGeWQ3 d6CQ2juouDJ1B1fqcPyDwyX+Vi/N+Blkg2W8c9iSuBV4PfzjhTNEbrSrY1Knd5Su2Cc/ j2dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=da6+RkwQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j37-20020a63fc25000000b003816043ef9esi13428433pgi.403.2022.03.21.14.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=da6+RkwQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A11531D9148; Mon, 21 Mar 2022 14:06:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351336AbiCUQmj (ORCPT + 99 others); Mon, 21 Mar 2022 12:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346336AbiCUQmf (ORCPT ); Mon, 21 Mar 2022 12:42:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3D306C904; Mon, 21 Mar 2022 09:41:05 -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=1alXXCG8SsafVFyYpDrzAC/fb1eFuk40wMrMnE1w1g4=; b=da6+RkwQDrJD49bGvpI587bS/z Ix8hy/7rZ9D03IZro7vw6f12P+9tYcDPF3OkgoLPCreLurjZjL6J8lDnP3+7p8hO7U7b/U5JboxjB +Wjw9lIOqeBFA6GZKvcSmIsZkkb+89edMIXGK8hvaEMS7fqaoqekUq7IXlAh+DShYIsZUIpy9KrD9 zNwKqsae/S7qS9U0ga9Bz6qU3GYGfsJcFQ8UCx8qOlaUy4E93qM+ba8cPOafHvpA3Wkr9yc9VtwYI 6UQ6SQuk0K5w0l7mtZK6iXNcpBlwFEvnJaYufmc9ne2i4+I1uOj+C5TxISnIJs3M1npeLovQk/Ksd NHA54u+w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWL59-00Akib-U9; Mon, 21 Mar 2022 16:40:36 +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 D75443001CD; Mon, 21 Mar 2022 17:40:32 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id ACD622DB8D795; Mon, 21 Mar 2022 17:40:32 +0100 (CET) Date: Mon, 21 Mar 2022 17:40:32 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Stephen Rothwell , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Linux Kernel Mailing List , Linux Next Mailing List , mhiramat@kernel.org, ast@kernel.org, hjl.tools@gmail.com, rick.p.edgecombe@intel.com, rppt@kernel.org, linux-toolchains@vger.kernel.org, Andrew.Cooper3@citrix.com, ndesaulniers@google.com Subject: Re: linux-next: build warnings after merge of the tip tree Message-ID: References: <20220321140327.777f9554@canb.auug.org.au> <20220321112805.1393f9b9@gandalf.local.home> <20220321121209.3b95e406@gandalf.local.home> <20220321121549.1c8588c5@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220321121549.1c8588c5@gandalf.local.home> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Mon, Mar 21, 2022 at 12:15:49PM -0400, Steven Rostedt wrote: > On Mon, 21 Mar 2022 12:12:09 -0400 > Steven Rostedt wrote: > > > > > funcB: > > > > call __fentry__ > > > push funcB on trace-stack > > > > > > > > [..] > > > call __fexit__ > > > pop trace-stack until empty > > > 'exit funcB' > > > 'exit funcA' > > > > And what happens if funcC called funcA and it too was on the stack. We pop > > that too? But it's not done yet, because calling of funcA was not a tail > > call. Hmm, yeah, how about we have __ftail__ mark the left function. func_B() { ... } func_A() { ... return func_B(); } func_C() { func_A(); ... return; } func_B: call __fentry__ /* push func_B */ ... call __fexit__ /* pop 1 + tails */ ret func_A: call __fentry__ /* push func_A */ ... call __ftail__ /* mark func_A tail */ jmp func_B func_C: call __fentry__ /* push func_C */ call func_A; ... call __fexit__ /* pop 1 + tails */ ret; Then the stack at the end of func_B looks something like: func_C func_A (tail) func_B And it will pop func_B plus all tails (func_A). > And I just thought of another issue, where even my solution wont fix it. > What happens if we trace funcA but not funcB? How do we get to trace the > end of funcA? Disallow tail calls to notrace?