Re: [PATCH] i2c: core-smbus: don't trace smbus_reply data on errors

From: Wolfram Sang
Date: Tue Feb 05 2019 - 14:08:55 EST



> > > Hmm, instead of tracing nothing, as this is already a "conditional
> > > trace event", why not add to that condition:
> > >
> > > TP_CONDITION(res >= 0 && read_write == I2C_SMBUS_READ),
> > >
> > > Unless you want to still trace some data on failure.
> >
> > John, any comment to this?
> >
>
> The issue we were dealing with was access to uninitialized memory on the stack.
> The change '30f939feaeee i2c: fix kernel memory disclosure in dev interface'
> does the initialization, so the tracing code is no longer affected.
> We just didn't
> have that change in the particular kernel we were testing.
>
> Still, Steven's suggestion seems fine to me. Would you like me to create a new
> patch based on that?

I am not a tracing expert, but all that was said here tell me that it
would be better to have the change. So, yes, please, that would be
appreciated.

Attachment: signature.asc
Description: PGP signature