LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Sachin Sant <sachinp@linux.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Kernel WARNING at lib/vsprintf.c:2721 while running ftrace kernel selftests
Date: Tue, 27 Feb 2024 09:18:58 -0500	[thread overview]
Message-ID: <20240227091858.7b66f8cc@gandalf.local.home> (raw)
In-Reply-To: <129D90CC-6DEB-4953-8061-EAA89F1ED514@linux.ibm.com>

On Tue, 27 Feb 2024 15:06:18 +0530
Sachin Sant <sachinp@linux.ibm.com> wrote:

> I used this setup to again run bisect between 6.7.0 and 6.8-rc1.
> Bisect points to following patch 
> 
> commit 8ec90be7f15fac42992ea821be929d3b06cd0fd9
>     tracing: Allow for max buffer data size trace_marker writes

Thanks, that was what I was looking for. Hmm, can you send me your config.
One thing that powerpc architecture has different is that the page size can
be much larger, and the calculations are based off of that.

Can you try this patch and see if it triggers?

Thanks,

-- Steve

diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 3e7fa44dc2b2..c3dba537f342 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -1589,6 +1589,9 @@ static enum print_line_t trace_print_print(struct trace_iterator *iter,
 	struct trace_seq *s = &iter->seq;
 	int max = iter->ent_size - offsetof(struct print_entry, buf);
 
+	if (WARN_ON_ONCE(max < 0))
+		return TRACE_TYPE_UNHANDLED;
+
 	trace_assign_type(field, iter->ent);
 
 	seq_print_ip_sym(s, field->ip, flags);

  reply	other threads:[~2024-02-27 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 16:31 Kernel WARNING at lib/vsprintf.c:2721 while running ftrace kernel selftests Sachin Sant
2024-02-26 17:22 ` Steven Rostedt
2024-02-27  9:36   ` Sachin Sant
2024-02-27 14:18     ` Steven Rostedt [this message]
2024-02-27 16:08       ` Sachin Sant
2024-02-27 16:24         ` Steven Rostedt
2024-02-27 16:38           ` Sachin Sant
2024-02-27 16:56             ` Steven Rostedt
2024-02-27 17:08               ` Steven Rostedt
2024-02-27 17:36                 ` Sachin Sant

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=20240227091858.7b66f8cc@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sachinp@linux.ibm.com \
    /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