mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tengda Wu <wutengda@huaweicloud.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Ingo Molnar <mingo@elte.hu>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] ftrace: Fix potential warning in trace_printk_seq during ftrace_dump
Date: Fri, 22 Aug 2025 09:35:43 +0800	[thread overview]
Message-ID: <edc9900c-b2d9-49f9-bd12-cd44f11b89a1@huaweicloud.com> (raw)
In-Reply-To: <20250821105113.1536d567@gandalf.local.home>



On 2025/8/21 22:51, Steven Rostedt wrote:
> On Thu, 21 Aug 2025 09:53:53 +0800
> Tengda Wu <wutengda@huaweicloud.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


      reply	other threads:[~2025-08-22  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  9:00 Tengda Wu
2025-08-20 14:10 ` Steven Rostedt
2025-08-21  1:53   ` Tengda Wu
2025-08-21 14:51     ` Steven Rostedt
2025-08-22  1:35       ` Tengda Wu [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=edc9900c-b2d9-49f9-bd12-cd44f11b89a1@huaweicloud.com \
    --to=wutengda@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®