[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <edc9900c-b2d9-49f9-bd12-cd44f11b89a1@huaweicloud.com>
Date: Fri, 22 Aug 2025 09:35:43 +0800
From: Tengda Wu <wutengda@...weicloud.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...e.hu>, linux-trace-kernel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] ftrace: Fix potential warning in trace_printk_seq
during ftrace_dump
On 2025/8/21 22:51, Steven Rostedt wrote:
> On Thu, 21 Aug 2025 09:53:53 +0800
> Tengda Wu <wutengda@...weicloud.com> wrote:
>
>> There remains an edge case that concerns me: if size is 0, setting len to
>> size - 1 would cause an underflow. Should we handle this edge case?
>
> When the trace_seq is allocated, the size is set to 8K. If size is ever
> zero, then there would be no buffer. So no, we should not worry about that
> edge case because if it happened then we have a lot of other things to
> worry about.
>
> -- Steve
Got it, thanks for the clarification.
-- Tengda
Powered by blists - more mailing lists