Re: [patch] Re: [discuss] f_ops flag to speed up compatible ioctls in linux kernel

From: Michael S. Tsirkin
Date: Sun Sep 12 2004 - 15:06:48 EST


Hello!
Quoting r. Andi Kleen (ak@xxxxxxx) "Re: [patch] Re: [discuss] f_ops flag to speed up compatible ioctls in linux kernel":
> > So I wander what goes on here- the syscall returns a long but
> > libc cuts the high 32 bit?
>
> System calls are always long, otherwise the syscall exit code cannot
> check properly for signal restarts.
>
> glibc seems to indeed truncate.
>
> >
> > Now that I think about it,for compat if you start returning 0 in low
> > 32 bits you are unlike to get the effect you wanted ...
> > The ioctl_native could be changed but that would make it impossible
> > for compatible ioctls to just use the same pointer in both.
> >
> > So what do you think - should I make just the native ioctl a long,
> > or both, and document that the high 32 bit are cut in the compat call?
>
> both + document.

Given that libc truncates the high 32 bit, that compat call can only use
low 32 bit, I begin to really think its better to leave this as int
and avoid the whole issue.

Additional advantage is in keeping
the exact same interface as ioctl is that its easier to change a driver
to use this interface - just assign the call in field, no other changes.

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