From nobody Mon Feb 9 13:01:31 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CA6F1DA32 for ; Thu, 26 Dec 2024 14:38:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735223916; cv=none; b=fl8OgksUxYpiDhPqQaUpEgwbV1H943ah25++s+cL/85j74b53ABelXfgto6f95qg6CPL3OFlW67FJAmrfIx1xY5mvaZFVuNqHQUhHW4ELnr3xtLMOHAC5xKGwKqeo5bcDHJ8dA113DYhjycJGjFhrF9wkzici8scEdmqALtcT0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735223916; c=relaxed/simple; bh=t5KW8e4DM31ve45mOklVt+pB2BaBEmmvMocTOUeG6xE=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=LahIaEk2rHHK3auUfGP7/ZOFqRcFsKuT78NxRuOHFzLTwQzFBqVbduJ6DxhkGvn5qVTERF72TQc7Ksr4BOyugDRm/0CT3ZJn9UejbXdDfe41URaqH/coyJDas4ROludGvh7KIrmfy3jvJSL9zEaaxs00yI+NIO04EA7Hpk+9jaI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CF64C4CED7; Thu, 26 Dec 2024 14:38:36 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1tQp1T-0000000G1po-0ZHQ; Thu, 26 Dec 2024 09:39:35 -0500 Message-ID: <20241226143934.984809025@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 26 Dec 2024 09:39:16 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Peter Zijlstra Subject: [for-next][PATCH 02/15] tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot References: <20241226143914.397394975@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt The mmiotracer is not set to be enabled at boot up from the kernel command line. If the boot command line tries to enable that tracer, it will fail to be enabled. The return code is currently zero when that happens so the caller just thinks it was enabled. Return -EINVAL in this case. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Peter Zijlstra Link: https://lore.kernel.org/20241219201344.854254394@goodmis.org Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e6e1de69af01..0aaf442271e9 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6116,7 +6116,7 @@ int tracing_set_tracer(struct trace_array *tr, const = char *buf) if (system_state < SYSTEM_RUNNING && t->noboot) { pr_warn("Tracer '%s' is not allowed on command line, ignored\n", t->name); - return 0; + return -EINVAL; } =20 /* Some tracers are only allowed for the top level buffer */ --=20 2.45.2