Re: [PATCH] x86/vdso: Use proper modifier for len's printf in extract

From: Borislav Petkov
Date: Wed Mar 03 2021 - 14:10:28 EST


On Wed, Mar 03, 2021 at 07:43:57AM +0100, Jiri Slaby wrote:
> Commit 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO
> functions") added a printf of len which is size_t. Compilers now
> complain on 32b:
> In file included from arch/x86/entry/vdso/vdso2c.c:162:
> arch/x86/entry/vdso/vdso2c.h: In function 'extract64':
> arch/x86/entry/vdso/vdso2c.h:38:52: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'}
>

I know it is obvious but how do you trigger this?

A 32-bit allmodconfig with both debian's gcc-10 and leap15's gcc-7 don't
trigger that warning. Which might answer your question why I haven't
caught it yet. :-)

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette