Received: by 2002:a05:6359:2142:b0:e9:5335:9d2d with SMTP id lq2csp22686rwb; Thu, 23 Mar 2023 11:45:23 -0700 (PDT) X-Google-Smtp-Source: AKy350am9lIAFcYqviCSH5G57scfQnnY3+I+gbw9/X4XT9ej1jvVN79dkSHkNb+B8TeYNtyqhuu1 X-Received: by 2002:a17:90b:613:b0:23f:d487:1bc8 with SMTP id gb19-20020a17090b061300b0023fd4871bc8mr6429368pjb.13.1679597123599; Thu, 23 Mar 2023 11:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679597123; cv=none; d=google.com; s=arc-20160816; b=JEIdL9MiSd9EwAWlv+SqCXMWYYhO9pk+5Ttz85lwOJJ/SBCGwCBAR/NCNmTO66ecJw Z7VYjX0fha0ctA8VxF8/YMl/aKo01oJLUX6NC4P2aC98miaVtDa1IgT2yCOIT0RY+baE icc7Uq33KWcsqmsoLIUXowAqTEqwMkYYN49x6y0NOMh1JKUfbpoPOM7eINvKdLhfdvar 7OWAAVdVAkmn0bYTXoIhbu73Mwb5CiIB6gP/KwMNy0eYpPzmmB7lwFCVc/uxHmOlOl1+ pRYBI9aQz3jkaj2uykaVY+bAKzHs6lUPmN/baYHtBlS5QROM0QbV1k5ftl8F84bDh7iP 72pw== 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=NfRG6wRlR2aOPoZdMDCcAcjBvqT+aUVJ+gJuDWJwFgI=; b=lOzq7U3EcMMLGoEUlMe46qvW+/cVNM7Ch3gCpRufzjKDHHgoXBzalayVWqRKyGB7XA HV42dfTOt9oDpxznW6qt7jhoR4ImPDJQ2iVCDJnbQA8wgcn3R+z1EoTUVJVHAm0Rqlie EoJ7zVmoJZ9xFgLwzYjtv3hoswttBX9S/T8/THj7IYUzfZSpauhFAD/NPZA7Tz1iG5Ak tEJyaew0UoBvdNdLJ5gm0yQwFf6f8j/0T0Y/gSEvTT1HsSG6t7J394XmZq1XBqxCmV+q HL09ydIz/mQTbB00JCUCYzeIxBCd4BzS+TMdcy4w9PUL5+zA6qlD3P0eGhSURCIf5uvA XrcA== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a170902e88500b00199213a3c67si20271057plg.606.2023.03.23.11.45.10; Thu, 23 Mar 2023 11:45:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbjCWSm0 (ORCPT + 99 others); Thu, 23 Mar 2023 14:42:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjCWSmY (ORCPT ); Thu, 23 Mar 2023 14:42:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66E312076 for ; Thu, 23 Mar 2023 11:42:23 -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 7270F6285F for ; Thu, 23 Mar 2023 18:42:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0A5DC433A0; Thu, 23 Mar 2023 18:42:21 +0000 (UTC) Date: Thu, 23 Mar 2023 14:42:20 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Mark Rutland , linux-kernel@vger.kernel.org, mhiramat@kernel.org, "Jose E. Marchesi" , Nick Desaulniers , Sami Tolvanen , Peter Zijlstra Subject: Re: [PATCH] tracepoint: Fix CFI failures with tp_stub_func Message-ID: <20230323144220.2729561c@gandalf.local.home> In-Reply-To: References: <20230323114012.2162285-1-mark.rutland@arm.com> <20230323085321.0f8d1b98@gandalf.local.home> <20230323123455.36dd83f6@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=-2.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,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 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. -- Steve