From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2575DC433FE for ; Mon, 21 Mar 2022 16:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236240AbiCUQYe (ORCPT ); Mon, 21 Mar 2022 12:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbiCUQYb (ORCPT ); Mon, 21 Mar 2022 12:24:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FC1C1EEEC; Mon, 21 Mar 2022 09:23:03 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CD00B61313; Mon, 21 Mar 2022 16:23:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97F06C340F0; Mon, 21 Mar 2022 16:23:00 +0000 (UTC) Date: Mon, 21 Mar 2022 12:22:59 -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: <20220321122259.28146a7a@gandalf.local.home> In-Reply-To: <20220321121549.1c8588c5@gandalf.local.home> References: <20220321140327.777f9554@canb.auug.org.au> <20220321112805.1393f9b9@gandalf.local.home> <20220321121209.3b95e406@gandalf.local.home> <20220321121549.1c8588c5@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 Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Mon, 21 Mar 2022 12:15:49 -0400 Steven Rostedt wrote: > 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? The only solution I can think of to handle all these cases is if you enable -mfexit, you have to disable tail calls completely. That's going to cause a performance impact. Perhaps we need need compiler help to give us a way to hijack the return address. But is there a way to do this and still not give up the security that CET SHSTK gives us? Or maybe another solution is: funcA: [..] jmp funcB call __fexit__ ret And if funcA is being traced, we change jmp to a call. [..] call funcB call __fexit__ ret Such that we only remove the tail calls if we enable tracing on the function with the tail call. -- Steve