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

From: Eric Dumazet
Date: Thu Sep 15 2011 - 10:37:52 EST


Le jeudi 15 septembre 2011 Ã 15:00 +0200, Thomas Meyer a Ãcrit :
> 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?

I think you should take a look at fs/compat.c



--
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/