Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2252297iof; Wed, 8 Jun 2022 00:32:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPd4R3ajbvRy5LG21GJAXa+wjO0srW5kHVtlmBcYAFiBz47FCejn44uOKc28bmXl6XOIZP X-Received: by 2002:a17:90a:eb11:b0:1e6:7865:4ecb with SMTP id j17-20020a17090aeb1100b001e678654ecbmr36768299pjz.172.1654673555521; Wed, 08 Jun 2022 00:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654673555; cv=none; d=google.com; s=arc-20160816; b=l68PwbEQgXLdtgrg2KaLblIvRyMcy2Xrc6HNsX3PflQR91GAU3Z2nOOWNJDtK6E4zh BQ8PHodcLCCSIBm7FnRjvVb9zVnBZxXywsFrZ2tBW6fLokjLn5B2b1UwyrIBCJzpYFgz hEQIUKqXWtcKTi/gWfDm3Eo/k4D0qDPbw2HNLthwlCdFy04SnCTgo8BABYXdN/2sUPXU kGyds0LYiTnniHQhnO+k5GU0csSLZLkeIw0llHYKCWtPhbbu93hGgjV3E6WQn0EI7pwQ qU8yxzvruASutN1NgLF/0dZW5BpGSd+C7Orb+7kgVfTw4Ql/RRWIMH6Ahoq0uvPhbS/n GYQg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K23ZWmWXr6C25gCVAqY09MjaKaJmPGIYHVEYr2TbjMw=; b=eJi2q66omMWwJW/jR7S1gPAROEsO/zOzqNr44oQZLbV2VhcfvaM6AhrLCnYYLz0omH UvUaa/NqvymiqhAVf5bkINMzAOdr6TTUMp0gqxaTg+PthrTeUEZY74X6Iaot/Jp1mW9u fKRs32IDIcTZb7JToF5I2u2NNtxdBWAeDqjubDrArNn0gO9gLygiKu8OxCn/Mbq5ehli 4T/iPH4SazrGhCdKOechwqsoODEyS2jmR3zB4ZHjj9nl8vjZpkUURzEhAFJStlok9U87 K/6AXtVguQy+XCBwP2P1lldWL6cDW9Z1lhRzwFA2gxiE9hAGl/RY0eKmhgRSruPt8H0l nxgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HYn3b8Zx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t14-20020a17090340ce00b00153b7df656asi26118277pld.490.2022.06.08.00.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 00:32:35 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HYn3b8Zx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1472202D01; Wed, 8 Jun 2022 00:05:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444799AbiFHBIB (ORCPT + 99 others); Tue, 7 Jun 2022 21:08:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383720AbiFGWGN (ORCPT ); Tue, 7 Jun 2022 18:06:13 -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 51974196A97; Tue, 7 Jun 2022 12:17:20 -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 E27A661846; Tue, 7 Jun 2022 19:17:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC5ABC385A5; Tue, 7 Jun 2022 19:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629439; bh=SlBPGji7woA4rGOeBaUnM7hABHCKRDfgOmNlCjm/ZjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HYn3b8Zxeeew95NSR6KksHcLtSGiugutbXinLSc1cbjdc5DDtwQvoQmiHPqIc7QvH 0PY/JQn2Hq714dyWLrw9GbsZojd1q6D4VVHxPCvSe5yRJmKOHoAncyXfv3Y8ttVN9o FmhuujlyeF1hhNGPgZoCBHgW/M7ydDQYwof7It3A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Huafei , "Steven Rostedt (Google)" , Sasha Levin Subject: [PATCH 5.18 692/879] tracing: Reset the function filter after completing trampoline/graph selftest Date: Tue, 7 Jun 2022 19:03:30 +0200 Message-Id: <20220607165022.935562268@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 From: Li Huafei [ Upstream commit e35c2d8e22745751cf304ec3fe39616643db2e0a ] The direct trampoline and graph coexistence test sets global_ops to trace only 'trace_selftest_dynamic_test_func', but does not reset it after the test is completed, resulting in the function filter being set already after the system starts. Although it can be reset through the tracefs interface, it is more or less confusing to the user, and we should reset it to trace all functions after the trampoline/graph test completes. Link: https://lkml.kernel.org/r/20220427034119.24668-1-lihuafei1@huawei.com Link: https://lore.kernel.org/all/20220418073958.104029-1-lihuafei1@huawei.com/ Fixes: 130c08065848 ("tracing: Add trampoline/graph selftest") Signed-off-by: Li Huafei Signed-off-by: Steven Rostedt (Google) Signed-off-by: Sasha Levin --- kernel/trace/trace_selftest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index abcadbe933bb..a2d301f58ced 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -895,6 +895,9 @@ trace_selftest_startup_function_graph(struct tracer *trace, ret = -1; goto out; } + + /* Enable tracing on all functions again */ + ftrace_set_global_filter(NULL, 0, 1); #endif /* Don't test dynamic tracing, the function tracer already did */ -- 2.35.1