From: Sachin Sant <sachinp@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] tracing: Remove precision vsnprintf() check from print event
Date: Tue, 5 Mar 2024 11:17:49 +0530 [thread overview]
Message-ID: <C6A44F79-8A0A-496C-82D2-2214BCC34C62@linux.ibm.com> (raw)
In-Reply-To: <20240304174341.2a561d9f@gandalf.local.home>
> On 05-Mar-2024, at 4:13 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> This reverts 60be76eeabb3d ("tracing: Add size check when printing
> trace_marker output"). The only reason the precision check was added
> was because of a bug that miscalculated the write size of the string into
> the ring buffer and it truncated it removing the terminating nul byte. On
> reading the trace it crashed the kernel. But this was due to the bug in
> the code that happened during development and should never happen in
> practice. If anything, the precision can hide bugs where the string in the
> ring buffer isn't nul terminated and it will not be checked.
>
> Link: https://lore.kernel.org/all/C7E7AF1A-D30F-4D18-B8E5-AF1EF58004F5@linux.ibm.com/
> Link: https://lore.kernel.org/linux-trace-kernel/20240227125706.04279ac2@gandalf.local.home
> Link: https://lore.kernel.org/all/20240302111244.3a1674be@gandalf.local.home/
>
> Reported-by: Sachin Sant <sachinp@linux.ibm.com>
> Fixes: 60be76eeabb3d ("tracing: Add size check when printing trace_marker output")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
This fixes the reported problem for me.
All the ftrace selftests complete without any fails.
# of passed: 121
# of failed: 0
# of unresolved: 6
# of untested: 0
# of unsupported: 7
# of xfailed: 1
# of undefined(test bug): 0
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
— Sachin
prev parent reply other threads:[~2024-03-05 5:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 22:43 [PATCH] tracing: Remove precision vsnprintf() check from print event Steven Rostedt
2024-03-04 23:23 ` Mathieu Desnoyers
2024-03-04 23:55 ` Steven Rostedt
2024-03-05 0:18 ` Steven Rostedt
2024-03-05 5:47 ` Sachin Sant [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C6A44F79-8A0A-496C-82D2-2214BCC34C62@linux.ibm.com \
--to=sachinp@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox