Re: a question regarding sys_poll() on x86_64 via tha ia32 layer

From: Thomas Meyer
Date: Thu Sep 15 2011 - 09:02:24 EST


Am Donnerstag, den 15.09.2011, 14:23 +0200 schrieb Eric Dumazet:
> Its a plain bug, please submit a formal patch.
>
> Probably not noticed because timer is set to more than 24 days.
>

okay. I think a similar problem exists for sys_truncate() in ia32 layer
on x86_64:

the ia32 syscall is directly wired to sys_truncate(char *, long).

signed long will use %rbx on x86_64 and %ebx on x86.

call sys_truncate on x86_64 from x86 userspace will handle length
0xffffffff not as -1.

maybe an easy fix would be to change long to unsigned long for
sys_truncate(), like sys_ftruncate(). what do you think?

with kind regards
thomas

Attachment: signature.asc
Description: This is a digitally signed message part