From mboxrd@z Thu Jan 1 00:00:00 1970 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 68A923ACF03; Mon, 23 Mar 2026 14:21:28 +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=1774275688; cv=none; b=Z0m7J/RzX+p/p3sjb2HnIBKYmP16Pjtr6eSrMZhltdnWcEJCdmMR1wZceQdvXD4auScD2a/1kRjyKhbK0mJXNuNa2DbMJThNMYBGtRy4eNLpmZ5CwT+UCDWTzrv34Bdh27XgnQ0ylYAZiamCuHJMZezfV988ZeqwWX0BE0eQPNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774275688; c=relaxed/simple; bh=GD0ww/ZP5oY3AlUI1XuA2g8zxu47eaTpyGd4H+LFO8E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gT5WIDeldLdYWaeoJ6pUjf3/Nb5AP7cIb3954pFR3ywZI28cT7yRYl8qCAueVNTIXBLAdyBoUlexYlvZKH/TF3KMd1Sxpg0rYKx18/wH94XEiDPPuCm4sc9K6vtPSOQFOmNMhFNhsXM5djknxh84FOv2MZTOhSLr+CxBVokbw98= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gfPETkr5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gfPETkr5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0078DC2BCB3; Mon, 23 Mar 2026 14:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774275688; bh=GD0ww/ZP5oY3AlUI1XuA2g8zxu47eaTpyGd4H+LFO8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfPETkr5l2Q5dSm4LoZuWCFRpOh42SHCzCvH8dC4NfV4JRAbiW670tTiKdIQfiBq9 0PpZ9AVLfznPizYt0Rji79MUpK9tC45c+bKBOqjQ69yGvMUbSGnkvkXVf+XoI5jN/u 82XsR2+jPWrfsyvKYrGNksLgWFWnyXXj1eqIuaOs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Masami Hiramatsu , Mathieu Desnoyers , Andrei-Alexandru Tachici , "Steven Rostedt (Google)" Subject: [PATCH 6.12 183/460] tracing: Fix enabling multiple events on the kernel command line and bootconfig Date: Mon, 23 Mar 2026 14:42:59 +0100 Message-ID: <20260323134531.039235695@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134526.647552166@linuxfoundation.org> References: <20260323134526.647552166@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrei-Alexandru Tachici commit 3b1679e086bb869ca02722f6bd29b3573a6a0e7e upstream. Multiple events can be enabled on the kernel command line via a comma separator. But if the are specified one at a time, then only the last event is enabled. This is because the event names are saved in a temporary buffer, and each call by the init cmdline code will reset that buffer. This also affects names in the boot config file, as it may call the callback multiple times with an example of: kernel.trace_event = ":mod:rproc_qcom_common", ":mod:qrtr", ":mod:qcom_aoss" Change the cmdline callback function to append a comma and the next value if the temporary buffer already has content. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://patch.msgid.link/20260302-trace-events-allow-multiple-modules-v1-1-ce4436e37fb8@oss.qualcomm.com Signed-off-by: Andrei-Alexandru Tachici Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_events.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -3999,7 +3999,11 @@ static char bootup_event_buf[COMMAND_LIN static __init int setup_trace_event(char *str) { - strscpy(bootup_event_buf, str, COMMAND_LINE_SIZE); + if (bootup_event_buf[0] != '\0') + strlcat(bootup_event_buf, ",", COMMAND_LINE_SIZE); + + strlcat(bootup_event_buf, str, COMMAND_LINE_SIZE); + trace_set_ring_buffer_expanded(NULL); disable_tracing_selftest("running event tracing");