[CRIU] [PATCH 09/15] parasite-vdso: add casts from uint64_t

Dmitry Safonov dsafonov at virtuozzo.com
Tue Apr 12 02:51:36 PDT 2016


On 04/11/2016 10:56 PM, Cyrill Gorcunov wrote:
> On Mon, Apr 11, 2016 at 03:19:23PM +0300, Dmitry Safonov wrote:
>> As for compatible 32-bit pie size of uint64_t is bigger than size of
>> unsigned long type, add proper casts, so we could build compatible pie.
>>
>> Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
> I don't understand this moment, what the problem with (void *) here?
> The kernel expects pointer to be passed here, how we can reach the
> situation wheren we strip off the pointer and send invalid value
> into the kernel? Or it's simply a build problem?
Just a build problem - gcc warns about uint64_t isn't the same as
(void *) for 32-bit compat binary. And for print format the same:
%lx expects (unsigned long), not uint64_t for 32-bit.

-- 
Regards,
Dmitry Safonov



More information about the CRIU mailing list