[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201015114931.1c9803ae@gandalf.local.home>
Date: Thu, 15 Oct 2020 11:49:31 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v3 0/3] tracing: Show real address instead of hashed
pointer
On Thu, 15 Oct 2020 23:54:58 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:
> Hi,
>
> Here is the 3rd version of the series for real address printing in trace log.
>
> Here is the previous version, I've fixed [1/3] to use krealloc(), fix memory
> allocation error check and add __printf() attribute, according to Steve's
> comment.
>
> https://lore.kernel.org/lkml/160275239876.115066.10891356497426857018.stgit@devnote2/
>
>
> Since trace_seq_printf() use in-kernel vsprintf() at last, the %p is always
> converted to the hash value instead of real address.
>
> For the dmesg it maybe secure, but for the ftrace, I think it is
> meaningless because
>
> - tracefs is used by root user, so no need to hide it.
> - tracefs user can access percpu/cpu*/trace_pipe_raw which stores real
> address on the trace buffer.
> - external commands like perf doesn't convert to the hash value.
>
> And when debugging kernel, we would like to know real address which tells
> us the address is in which area in the kernel by comparing with kernel
> memory mapping.
>
> However, to compare the trace log with dmesg, we also need a bridging
> information. So 3/3 gives the options/hash-ptr knob which switches
> the output format.
>
Thanks Masami,
I'm going to hold off on adding this for this merge window, and look at
applying it for the next window.
-- Steve
Powered by blists - more mailing lists