Re: [PATCH] io_uring: Add to traces the req pointer when available

Olivier Langlois
2021-05-25T21:48:59Z

On Tue, 2021-05-25 at 17:26 -0400, Olivier Langlois wrote:
> but the pointers should be hashed by trace.
>
> That would be nice if someone more knowledgeable about the tracing
> system could jump in and comment about the hash-ptr option and tell
> when it is applied and when it is not...

My concern about hashing pointers directly in the io_uring code
directly. It is that by doing so will make it impossible for a
sufficiently priviledged user to get the raw pointer values without
reverting back the pointer hashing stuff.

that would not be the right way to address the security concern if the
tracing subsystem already hash them by default and is configurable to
display raw pointers if desired.

My issue is that I haven't been able to see hashed pointers output from
trace.

The only way that I know to get the traces is with 'sudo perf' and I
have never seen hashed pointers with it.

but the code is there... If you grep 'TRACE_ITER_HASH_PTR' in
kernel/trace/trace.c

I just haven't spent days in studying the tracing code to figure out
how it all works...