[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wi53cJEKim7UvUXtdhQG1BR7oU5TABPXaOq5SmBKLSKYg@mail.gmail.com>
Date: Mon, 4 Mar 2024 15:20:52 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Sachin Sant <sachinp@...ux.ibm.com>
Subject: Re: [GIT PULL] tracing: Prevent trace_marker being bigger than
unsigned short
On Mon, 4 Mar 2024 at 14:08, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> Fine, I'll just remove the precision as that's not needed. There was no
> other overflows involved here.
I really want you to add the size check on the trace buffer *creation* side.
I don't understand why you refuse to accept the fact that the
precision warning found a PROBLEM.
And no, the fix was never to paper over the problem by limiting the
precision field. Hiding a problem isn't fixing it.
And no, the fix was also never to chop up the printing of the string
in smaller pieces to hide paper over the precision field. Again,
hiding a problem isn't fixing it.
And finally, NO, the fix was also never to add extra debug code to see
that there was a NUL character there.
The fix was *always* to simply not accept insanely long strings in the
first place, and make sure that the field was correctly *set*.
IOW, at *creation* time the code needed a proper check for length
(which obviously indirectly includes checking for the terminating NUL
character at that point).
Why do these threads with you always have to end up this long? Why do
I Nhave to explain every single step of the way that you need to *FIX*
the problem, not try to hide it with new extra code.
Linus
Powered by blists - more mailing lists