Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp163959rwb; Mon, 26 Sep 2022 10:35:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7NftYKYG4/iKYIzlQMkGZp4SQUvpyU0eCS5K115YLjn7wCUwbYizgCKoa9yXfapOUzX/Tn X-Received: by 2002:aa7:d883:0:b0:44e:bbbe:d661 with SMTP id u3-20020aa7d883000000b0044ebbbed661mr23539962edq.248.1664213720091; Mon, 26 Sep 2022 10:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664213720; cv=none; d=google.com; s=arc-20160816; b=av8yJOuVUvE35jin5hT4neQbq33dMrpjcEzbdaVMeGWKmWMJYB+uV/1P/rx3tiSsE1 Bh2hnbwJXdSnwAnV1p/jxNjYp88iuotHyMWo/rtGPTLgfqfiQCGTKo31EWp420f3zCVS aaN4tqbvgIWpVqkW4An/80QgEQ4NfWzH6g6SCKI1t3TmaRYtr5BZs8qSKdTZl7f0YKrL 7sE1dYd9sMqpON3M+5BTlsO2wWH4sL6F8DUG5Dl61pN13ekF2Tcyd+y8ybyTy37nDWWI x43mv02iInm6GHvn3XmwXYoxAdh8+AYrbZuuSPePhoFz3vJjbyXyWRu0wG20+bbGPObM 9rZw== 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=J7FuAaoSLYm9G/+lzaIZm6CC1ZKGb7ivceCHnJcLby4=; b=SpZpBmjHCYrlWUmPZrrMKC7E91NnbIGokg3W4l5O2bvAIBKoq0/JQZhIuGvPErPSZf GgeQckTm+KVMT3tUEHgm+8UkFxv3ehJ3pUbiXTT+FF0H+KLsKV81km4lf+X73iysikj0 4Gg+QOHVMy8/tFwFavNX9yvccdpQf782hlx0ZIPeL3KBmWGVotQ1POkm6AUDcKIwhrlD 0vqZTsHAuBCmTnmj2auDfJKQwXZa+isXGpdy7nfIS87VCbRpJZV1JY4f7uLITQ74jewK qivbOWF0n4fGMBx0BFPm81PJGV5ihD8hQNAU9P0Qpz1p/V1dUx0ugsl64uXJpja4vjT6 D1WA== 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 y21-20020a056402359500b00453e1a11542si19843716edc.493.2022.09.26.10.34.52; Mon, 26 Sep 2022 10:35:20 -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 S229611AbiIZRT5 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 26 Sep 2022 13:19:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbiIZRTY (ORCPT ); Mon, 26 Sep 2022 13:19:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78246EDD09 for ; Mon, 26 Sep 2022 09:33:40 -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 183C360F93 for ; Mon, 26 Sep 2022 16:33:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96E22C433B5; Mon, 26 Sep 2022 16:33:08 +0000 (UTC) Date: Mon, 26 Sep 2022 12:34:16 -0400 From: Steven Rostedt To: Nadav Amit Cc: Peter Zijlstra , LKML , X86 ML , Dave Hansen , Borislav Petkov , Ingo Molnar , Thomas Gleixner Subject: Re: [RFC PATCH] x86/syscalls: allow tracing of __do_sys_[syscall] functions Message-ID: <20220926123416.6524c88b@gandalf.local.home> In-Reply-To: <72644F1F-7A13-4CC1-8C24-BE271323FE94@gmail.com> References: <20220913135213.720368-1-namit@vmware.com> <2D09BBFE-45F3-4B9C-8734-D002CA99FD94@gmail.com> <72644F1F-7A13-4CC1-8C24-BE271323FE94@gmail.com> 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=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Tue, 20 Sep 2022 18:31:24 -0700 Nadav Amit wrote: > Commit 45959ee7aa645 (“ftrace: Do not function trace inlined functions”) > gives two reasons which correspond with what you were saying: (1) > consistency and (2) function that should not be traced are mostly marked as > inline. > > I am not sure I fully agree with the arguments, specifically the consistency > (any function might be inlined and not traceable). But I am too afraid/lazy > to cause damage and fix it. I will remove the inline and play a bit with the > kernel to see how it behaves. The main concern is two fold. 1) In the beginning, the function tracer was very susceptible to recursion crashes (it's much more robust now), and depending on whether the compiler decided to inline a function or not, would decide if a recursive function would crash the kernel or not. It was a nightmare to debug! 2) Consistency. I was tired of getting bug reports that would say "hey kernel X on machine M1 has function F available for tracing, but kernel X on machine M2 does not have function F available". It was that the compiler for M1 did not inline the function where it did for M2. -- Steve