Re: [PATCH v5 05/13] module: Add printk formats to add module build ID to stacktraces

From: Andy Shevchenko
Date: Fri Apr 23 2021 - 09:25:04 EST


On Thu, Apr 22, 2021 at 04:46:40PM -0700, Stephen Boyd wrote:
> Quoting Andy Shevchenko (2021-04-21 04:49:33)
> > On Tue, Apr 20, 2021 at 02:49:55PM -0700, Stephen Boyd wrote:

...

> > > Example:
> >
> > Please, shrink the example to leave only meaningful lines.
> >
> > Why, e.g., do we need to see register dump, is it somehow different?
>
> Can you format it how you would like to see it? Should it be a unified
> diff? I agree it would help to see "what changed" but also don't know
> what you want so opted to provide more information, not less. I was
> worried about the questions like "do you change other parts of a splat?"
> so I just put the whole thing there.


Before:
...line X...
...
...line Y...

After:
...line X'...
...
...line Y'...

Three lines of example per each paragraph, in each of them the middle one is
simply [...].

...

> > > +#ifdef CONFIG_STACKTRACE_BUILD_ID
> > > + /* Module build ID */
> > > + unsigned char build_id[BUILD_ID_SIZE_MAX];
> >
> > Is it really string of characters? Perhaps u8 will be more explicit.
>
> I'm just matching the build ID API that uses unsigned char. If you want
> u8 then we should update more places. I could do that in a followup
> patch, but this one is already sorta big.

Unsigned char here is confusing. I would prefer a prerequisite patch to fix
other places first.

...

> > > +#include <linux/kernel.h>
> >
> > What do you need this header for?
> >
>
> For typeof_member().

Argh... We really need to split this and container_of to something else. Having
entire kernel.h for that is an overkill.

--
With Best Regards,
Andy Shevchenko