Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2272534pxp; Mon, 21 Mar 2022 15:32:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS+s2FZLR5iwt5cXJxh79b5jVIvcryBGy8tI22Ut5fDJEu7ebbOHpNbjXAOf/8o8obPCwL X-Received: by 2002:a62:15c6:0:b0:4f7:4392:40c7 with SMTP id 189-20020a6215c6000000b004f7439240c7mr26478330pfv.5.1647901947561; Mon, 21 Mar 2022 15:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901947; cv=none; d=google.com; s=arc-20160816; b=08Fp7J1ADtlKIqnW8mWIbH/5LhkhjshcgDCVyylhJWc5UT0jkqArYkTBWPueTyYGzG EWIK/bNrxWxp8of29SnF3PYeJrgCPlNfHwkaO69ag9a6zWqc+AlIObhRDGq/qawMw+X1 XnhorQlPC4MmDqoYjZDv7dg+oevc3TGGC03IxTFu6Djzu0HG5B2taC9C2G5PB30Q8pbD HJYdLuTi5CR3VIIJ3fJWd+xk9HFoBP7AdN833gR1dhItfj3rhGIhTzVXzS07fRskGkmG UR8UgEaYYQ7zwDiJx+JwoGA+OV6pH2lhmPfK3OmsD46pR291SmaHgIHa5YIyX0BCGUmo kNjQ== 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=UcUcIeey/YIirHOgn4P8NfLsQ5EaiROen/DEwa1L0NA=; b=iDpAXV+7Ef67zCgzKPiteUltW/6n2UcSSnSMiUbZhwuJtB5ByiJFh38/EQWDa3lAFt xjM5cd+OCGRO0xW8jB6nFsWQMvJSQ5wKWjISEqJICRWNogjwUvwiVkkohK2Rf5Zgu8wz cbfBzyW7tZolxIiX1/+t3hI+SI151lgsCGq1eYietJ1+iMLFqmIXYzn9l7raVdcd+qNa NQKCZNl6RRqTawDvZyv1Sxt9fB2JSOZu8RS6n3w8FSNoonG8S1+bfLx71JKIArtdbfiF cRtfiGN0LoEsaNg85svGfWwmXCui8CoBRvGS9Kk5mi3mP5QRjQhSbOS66nALX/Jmb4yd /mjA== ARC-Authentication-Results: i=1; mx.google.com; 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 c10-20020a056a00248a00b004fa3a8e00a6si6301331pfv.349.2022.03.21.15.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:32:27 -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; 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 3C7F53C8AF1; Mon, 21 Mar 2022 14:45:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351043AbiCUQYh (ORCPT + 99 others); Mon, 21 Mar 2022 12:24:37 -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 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 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