Re: [REGRESSION PATCH V2] vsprintf: Change structprintf_spec.precision from s8 to s16

From: Eric Paris
Date: Wed Apr 14 2010 - 14:51:26 EST


On Wed, 2010-04-14 at 09:27 -0700, Joe Perches wrote:
> Commit ef0658f3de484bf9b173639cd47544584e01efa5 changed precision
> from int to s8.
>
> There is existing kernel code that uses a larger precision.
>
> An example from the audit code:
> vsnprintf(...,..., " msg='%.1024s'", (char *)data);
> which overflows precision and truncates to nothing.
>
> Extending precision size fixes the audit system issue.
>
> Other changes:
>
> Change the size of the struct printf_spec.type from u16 to u8 so
> sizeof(struct printf_spec) stays as small as possible.
> Reorder the struct members so sizeof(struct printf_spec) remains 64 bits
> without alignment holes.
> Document the struct members a bit more.
>
> Original-patch-by: Eric Paris <eparis@xxxxxxxxxx>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

Sorry slow today

Acked-by: Eric Paris <eparis@xxxxxxxxxx>
Tested-by:
Review-by:
anything else?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/