Re: [PATCH v1 1/1] vsprintf: Fix potential unaligned access

From: Andy Shevchenko
Date: Tue Jan 11 2022 - 10:10:45 EST


On Tue, Jan 11, 2022 at 03:57:36PM +0100, Petr Mladek wrote:
> On Mon 2022-01-10 22:50:49, Andy Shevchenko wrote:
> > The %p4cc specifier in some cases might get an unaligned pointer.
> > Due to this we need to make copy to local variable once to avoid
> > potential crashes on some architectures due to improper access.
> >
> > Fixes: af612e43de6d ("lib/vsprintf: Add support for printing V4L2 and DRM fourccs")
> > Cc: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> Looks good to me:
>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
>
> I have already sent pull request for 5.17. Could this wait
> for 5.18 or would you prefer to get it into 5.17, please?

It's not so critical.
But would be nice to have.

> My understanding of Sakari's reply is that the current callers
> provide aligned pointers. In that case it would not be urgent.
> But I might have gotten it wrong.

Not really. There are potential unaligned callers, but Sakari
has another patch that fixes that on the (one of *) caller side.

*) I dunno how many other callers (probably none) in tree and
how many potentially can be with similar issue.

--
With Best Regards,
Andy Shevchenko