From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tom Zanussi <zanussi@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] tracing: Fix reading strings from synthetic events
Date: Tue, 11 Oct 2022 17:58:31 -0400 [thread overview]
Message-ID: <20221011175831.3dd2d460@rorschach.local.home> (raw)
In-Reply-To: <20221011212702.220048293@goodmis.org>
On Tue, 11 Oct 2022 17:25:03 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> @@ -417,19 +420,28 @@ static unsigned int trace_string(struct synth_trace_event *entry,
> data_offset += event->n_u64 * sizeof(u64);
> data_offset += data_size;
>
> - str_field = (char *)entry + data_offset;
> -
> - len = strlen(str_val) + 1;
> - strscpy(str_field, str_val, len);
> -
> + len = kern_fetch_store_strlen(str_val) + 1;
> + if (len == 1)
> + len = strlen("fault") + 1;
> data_offset |= len << 16;
> *(u32 *)&entry->fields[*n_u64] = data_offset;
>
> + kern_fetch_store_string((unsigned long)str_val, &entry->fields[*n_u64], entry);
> +
This isn't working quite right on faults. I'll be sending a v2 later.
-- Steve
prev parent reply other threads:[~2022-10-11 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221011212501.773319898@goodmis.org>
2022-10-11 21:25 ` [PATCH 1/2] tracing: Move duplicate code of trace_kprobe/eprobe.c into header Steven Rostedt
2022-10-11 21:25 ` [PATCH 2/2] tracing: Fix reading strings from synthetic events Steven Rostedt
2022-10-11 21:58 ` Steven Rostedt [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=20221011175831.3dd2d460@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=stable@vger.kernel.org \
--cc=zanussi@kernel.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