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 11:24:43 -0500 [thread overview]
Message-ID: <20240227112443.0bd9f4b8@gandalf.local.home> (raw)
In-Reply-To: <1F8D4E65-4E23-49FD-B092-980BB1203E19@linux.ibm.com>
On Tue, 27 Feb 2024 21:38:57 +0530
Sachin Sant <sachinp@linux.ibm.com> wrote:
> This warning was not triggered.
Interesting.
>
> I have attached .config
This is what I was looking for:
> # CONFIG_PPC_4K_PAGES is not set
> CONFIG_PPC_64K_PAGES=y
> CONFIG_PAGE_SIZE_64KB=y
> CONFIG_PPC_PAGE_SHIFT=16
So the pages are 64K in size. I wonder if this is causing an issue.
Can you apply this, and see if it triggers and if it does, print the line
that has the max size?
-- Steve
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 3e7fa44dc2b2..43e270bf8d78 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_ONCE(max < 0 || max > 2000, "MAX OUT OF RANGE %d", max))
+ return TRACE_TYPE_UNHANDLED;
+
trace_assign_type(field, iter->ent);
seq_print_ip_sym(s, field->ip, flags);
next prev parent reply other threads:[~2024-02-27 16:23 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
2024-02-27 16:08 ` Sachin Sant
2024-02-27 16:24 ` Steven Rostedt [this message]
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=20240227112443.0bd9f4b8@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