Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2273219pxp; Mon, 21 Mar 2022 15:33:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnsQ6moieN/zcS4VDeASQBkyx2ddGSfhtEO++iLKowUdKvJnExUDd9o9YESzmwSFA4/ABQ X-Received: by 2002:a17:903:24f:b0:14f:73fa:2b30 with SMTP id j15-20020a170903024f00b0014f73fa2b30mr15238997plh.174.1647902011443; Mon, 21 Mar 2022 15:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647902011; cv=none; d=google.com; s=arc-20160816; b=C+MkGvh64GBREU9gTP3TuHa1PEknehYO2Tys1K25PZXXXGV0SAbLqjJPN0iQN6VLzM t/4bs7q9cXVfmSOmRHFbpCHuTdY1tn6CftdzhA8o/HN/E/zQF/FDqO+YeSi2vCRlohp9 t7lUrZaw2ywwLa8MKAed6QHRvtEw/6Jpuk1QYev0nY/02at8lfAHmET9T3mfKMzu0Lbl gQ6NKMuCsKeXtROoVnqIQ+OOk+OrldW5qI/R4YCvS5OP1weBH46oTdUnJdmUHTl6MAvQ CnHx54wjgPMaqeugbYfQMqvYtpVKSSSGPVyRkMgICoYVyUn/KfFMjgtf2jjXZBsEyDb6 5CWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=QnGbBInX62nAq8bG3xdBVGWNKT8Jn+HwgX+DqWYymOg=; b=hPWic+3SpfTCDnMVyI1ibxXg2gg0UIian/2e4+U0BSmj4hIGX8mMJQyViNqUias+LV jUw7G8JEAHMJpoyv56XQQP95wRMDVjS2FPTswDiNIb+zz3kU/6yqVNPgAPz3LKHXFoFQ Pg73sfeFk6FYPob1VdXTSaHo5MjIz75H9hvdQbG5namGxyH1MdgVkOEfNYFozfrZnJUU M6wd9tZJiiX6bYRGL3dTZrZgcq5R03B1KSwibR95AIQKYfZR2yKbNKg3qdeMzFxspDph 3kR9f/T/tgCkfGGRa5oJ1QuDPwuHLvS751lt9m7z4k8E9me3XMMfioM/zOy8NgWY56u5 fBMg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h6-20020a62b406000000b004fa3a8dffb6si7485994pfn.109.2022.03.21.15.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:33:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 4A3153D08DA; Mon, 21 Mar 2022 14:46:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344229AbiCUQNm (ORCPT + 99 others); Mon, 21 Mar 2022 12:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234996AbiCUQNl (ORCPT ); Mon, 21 Mar 2022 12:13:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5B6129811; Mon, 21 Mar 2022 09:12:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4487BB81440; Mon, 21 Mar 2022 16:12:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AD07C340E8; Mon, 21 Mar 2022 16:12:11 +0000 (UTC) Date: Mon, 21 Mar 2022 12:12:09 -0400 From: Steven Rostedt To: Peter Zijlstra 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: <20220321121209.3b95e406@gandalf.local.home> In-Reply-To: References: <20220321140327.777f9554@canb.auug.org.au> <20220321112805.1393f9b9@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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, 21 Mar 2022 17:04:28 +0100 Peter Zijlstra wrote: > On Mon, Mar 21, 2022 at 11:28:05AM -0400, Steven Rostedt wrote: > > On Mon, 21 Mar 2022 14:04:05 +0100 > > Peter Zijlstra wrote: > > > > Also, folks, I'm thinking we should start to move to __fexit__, if CET > > > SHSTK ever wants to come to kernel land return trampolines will > > > insta-stop working. > > > > > > Hjl, do you think we could get -mfexit to go along with -mfentry ? > > > int funcA () { > > [..] > > return funcB(); > > } > > > This currently works with function graph and kretprobe tracing because of > > the shadow stack. Let's say we traced both funcA and funcB > > > > funcA: > > call __fentry__ > push funcA on trace-stack > > > > [..] > > jmp funcB > > > > 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. -- Steve > > > ret > > > > > That is, the current algorithm traces the end of both funcA and funcB > > without issue, because of how the shadow stack works. > > And it all works, no? Or what am I missing?