Re: [PATCH] trace-cmd: Change tracecmd_msg's buf member type to char *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 22, 2019 at 5:25 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Fri, 22 Mar 2019 17:01:05 +0200
> Slavomir Kaslev <kaslevs@xxxxxxxxxx> wrote:
>
> > Now that the buffer for protocol V3 messages is always text, it makes sense to
> > have it declared as such and drop a few casts.
>
> Is it always text?
>
> When debugging the listener I saw the meta data sent as non text.
>
>  tracecmd_msg_data_send()
>
> Sends the data in binary, not text. Which is what we want.

You're completely right. I still think that it makes sense to have
that patch go in, maybe with rewritten commit message.
In tracecmd_msg_read_data()[1] we do pointer arithmetic on void
pointer which is undefined behavior (though gcc allows it unless
-pedantic-errors is passed) and this patch will take care of it.

Should I resend or drop it?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/tree/tracecmd/trace-msg.c#n665

-- Slavi




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux