Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7532rwl; Thu, 23 Mar 2023 11:56:28 -0700 (PDT) X-Google-Smtp-Source: AKy350bE4DpNgkhr4nOR2ZZU/2ChFF+BdkhDDSxTJ1XekeS9EI7sliiMkCcyIvnXsw34u0/Gz+kS X-Received: by 2002:a17:903:1c1:b0:1a2:3b6:8319 with SMTP id e1-20020a17090301c100b001a203b68319mr4455324plh.54.1679597788321; Thu, 23 Mar 2023 11:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679597788; cv=none; d=google.com; s=arc-20160816; b=JfAGceLtyn7uWK5v0MT3f/oFz5Zi5QpTRueFw26j1JEHI0TWFu2IotDSSZch1pHaYb 7GgtvSFPPWydWFmwOKtqX3BQ3qP0hIttbZbJMa88KAQ690csso0/F1QKFLCxyaIDTYol 29YhhlUjcfMG+C9/Yn7Ox3HyBA6JDqI0cxOwNbfYEYTsD6jjAsF60eFFpBNefOC2VPsO zz/Gt7O96qnjSoIsMlw5y23aZcXN4Kj/06dLmAUUGbYs/xo61FcNoIP+/SqfehtLCOy+ 8L4l382QyaE1dA/Bhn083cGe7PschZW773kq0/LpptDWvpsuvCRlKvGpbijDKC6O3894 7rIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0VzkgeE8SQJ19MUVpFB1VvgyzyP3+Y1XtWCWcC5UVsE=; b=wApYCszZEnb2TDBFIZ0ZlXu6RyEvikpkALUek51Dq9T0S5OObqhR2C+qei558i+VLe 1UtxwC8Cb9yzejG0pNyblA1wOgubOFRif7isl1b7SHOqn/RlYolbRJq3XcOR3K7NCA83 HpKLJbs2Ux7WmWgxbcs3JplHI7n7AV3KRcf0F2J1pwlqbx09Gl2ZBnqfMz19+TS0Kzez 86A0n8GSA6ebCYzYiaqnwt1kaH3zvXj1Ev0XjKuNBQE9ZKKpkv5WVXpbHf1lNEVtnlBb sUDU8YIh9zTwg+S5/p6RUj1axuBMzzhtMxOeeL52pak5FO49QtYv3O6KXPOKYYGIq7M5 1ICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=gDOdm2Vj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a17090301d000b001a20679d548si1431775plh.183.2023.03.23.11.56.15; Thu, 23 Mar 2023 11:56:28 -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=@efficios.com header.s=smtpout1 header.b=gDOdm2Vj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231461AbjCWSnx (ORCPT + 99 others); Thu, 23 Mar 2023 14:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjCWSnv (ORCPT ); Thu, 23 Mar 2023 14:43:51 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D26D3FF08 for ; Thu, 23 Mar 2023 11:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1679597029; bh=jeUin32YtQzZhhgIojdyXJmObzwf8N5YsZ3ueZarszs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gDOdm2Vjm/JaNMQ7zrD5+bEK6ZYbCkwTAAZdP9XbDXv8lq3yK/LOPyrOaEMf/vCeE YQzn7JV/+xa0kM+hCjh7/68oHrwFbWPdjW7sCijvVG7Ctt2PAlwws4LiYGYcLZPFPt npe4mNiXnYAiSKHDtwo8ib+c/p2exJPONFZfdnYYYDZ6rQDKE4DarTdH9NDPF8ILkj bO//72RwlBsWV9S84vtPDuI2dhZQaiRk/dahM15zDYzSW+O4igOiQI3UjNKA4yd/R4 +tfvNDzcvCbWWs0n3pjao8BdA5fWsq+Lm9O4d2gp7yGntwlvYExsAL5tsMk2NWbvKA VLdGnqIee9ciQ== Received: from [172.16.0.188] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4PjDks5sXGzt3H; Thu, 23 Mar 2023 14:43:49 -0400 (EDT) Message-ID: <79f7638e-bbeb-d959-6143-c678a8225459@efficios.com> Date: Thu, 23 Mar 2023 14:44:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] tracepoint: Fix CFI failures with tp_stub_func Content-Language: en-US To: Steven Rostedt Cc: Mark Rutland , linux-kernel@vger.kernel.org, mhiramat@kernel.org, "Jose E. Marchesi" , Nick Desaulniers , Sami Tolvanen , Peter Zijlstra References: <20230323114012.2162285-1-mark.rutland@arm.com> <20230323085321.0f8d1b98@gandalf.local.home> <20230323123455.36dd83f6@gandalf.local.home> <20230323144220.2729561c@gandalf.local.home> From: Mathieu Desnoyers In-Reply-To: <20230323144220.2729561c@gandalf.local.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 2023-03-23 14:42, Steven Rostedt wrote: > On Thu, 23 Mar 2023 14:37:15 -0400 > Mathieu Desnoyers wrote: > >>> Repeated again so Mathieu doesn't have to search for it. >>> >>> [ Note, this version does use undefined compiler behavior (assuming that >>> a stub function with no parameters or return, can be called by a location >>> that thinks it has parameters but still no return value. Static calls >>> do the same thing, so this trick is not without precedent. >>> >>> There's another solution that uses RCU tricks and is more complex, but >>> can be an alternative if this solution becomes an issue. >>> >>> Link: https://lore.kernel.org/lkml/20210127170721.58bce7cc@gandalf.local.home/ >>> ] >> >> Ugh. The last thing we need there is more RCU complexity. My brain is still recovering >> from fixing the last time the introduction of static calls special-cases ended up subtly >> breaking tracepoints. > > Well, we can go back to your approach with doing the check in the iterator. > Setting it to 0x1UL I think is what you wanted (to know it's a removed > function and not a random NULL). > > I could write that up if you want. I can write the patch and send an RFC, won't take long. Thanks, Mathieu > > -- Steve -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com