From: Tom Zanussi <zanussi@kernel.org>
To: kernel test robot <rong.a.chen@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
lkp@lists.01.org
Subject: Re: [tracing] 9fe41efaca: BUG:unable_to_handle_page_fault_for_address
Date: Wed, 12 Feb 2020 09:59:04 -0600 [thread overview]
Message-ID: <1581523144.8740.8.camel@kernel.org> (raw)
In-Reply-To: <20200212113444.GS12867@shao2-debian>
Hi,
On Wed, 2020-02-12 at 19:34 +0800, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-7):
>
> commit: 9fe41efaca08416657efa8731c0d47ccb6a3f3eb ("tracing: Add synth
> event generation test module")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
> master
>
> in testcase: rcuperf
> with following parameters:
>
> runtime: 300s
> perf_type: rcu
>
>
>
> on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2
> -m 8G
>
I think the below patch should fix this, but I'm not able to build and
test on a 32-bit system at the moment - my system needs an update to be
able to run the qemu lkp-tests and my real 32-bit system is also having
problems of its own. I'll verify that this actually works on the lkp-
tests once I get to the point of being able to test this on i386.
Thanks,
Tom
Subject: [PATCH] tracing: Remove bogus 64-bit synth_event_trace() vararg
assumption
The vararg code in synth_event_trace() assumed the args were 64 bit
which is not the case on 32 bit systems. Just use long which should
work on every system, and remove the u64 casts from the synth event
test module.
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
---
kernel/trace/synth_event_gen_test.c | 4 ++--
kernel/trace/trace_events_hist.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/synth_event_gen_test.c b/kernel/trace/synth_event_gen_test.c
index 4aefe003cb7c..2a7465569a43 100644
--- a/kernel/trace/synth_event_gen_test.c
+++ b/kernel/trace/synth_event_gen_test.c
@@ -424,11 +424,11 @@ static int __init test_trace_synth_event(void)
/* Trace some bogus values just for testing */
ret = synth_event_trace(create_synth_test, 7, /* number of values */
444, /* next_pid_field */
- (u64)"clackers", /* next_comm_field */
+ "clackers", /* next_comm_field */
1000000, /* ts_ns */
1000, /* ts_ms */
smp_processor_id(), /* cpu */
- (u64)"Thneed", /* my_string_field */
+ "Thneed", /* my_string_field */
999); /* my_int_field */
return ret;
}
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 2fcb755e900a..e65276c3c9d1 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1883,12 +1883,12 @@ int synth_event_trace(struct trace_event_file *file, unsigned int n_vals, ...)
va_start(args, n_vals);
for (i = 0, n_u64 = 0; i < state.event->n_fields; i++) {
- u64 val;
+ long val;
- val = va_arg(args, u64);
+ val = va_arg(args, long);
if (state.event->fields[i]->is_string) {
- char *str_val = (char *)(long)val;
+ char *str_val = (char *)val;
char *str_field = (char *)&state.entry->fields[n_u64];
strscpy(str_field, str_val, STR_VAR_LEN_MAX);
--
2.14.1
next prev parent reply other threads:[~2020-02-12 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 11:34 [tracing] 9fe41efaca: BUG:unable_to_handle_page_fault_for_address kernel test robot
2020-02-12 15:59 ` Tom Zanussi [this message]
2020-02-12 19:50 ` [PATCH] tracing: Remove bogus 64-bit synth_event_trace() vararg assumption Steven Rostedt
2020-02-12 20:10 ` Tom Zanussi
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=1581523144.8740.8.camel@kernel.org \
--to=zanussi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@lists.01.org \
--cc=mhiramat@kernel.org \
--cc=rong.a.chen@intel.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).