Hello all,
In [elks 0.78] fs/select.c there is a problem in sys_select() at
lines 344 and 345:
timeout = ROUND_UP(get_user(&tvp->tv_usec),(1000000L/HZ));
timeout += get_user(&tvp->tv_sec) * (unsigned long) HZ;
Note that get_user() is a macro based on peekw(). But peekw()
returns a 16 bit value, and tvp->tv_usec and tvp->tv_sec are both
32 bits in size. Therefore it appears that this code is wrong;
we are trying to return a 32 bit value from a 16 bit function.
Suggested fix: implement a function get_user_long().
See kernel/sys.c where a function called put_user_long() is
called (but it is NOT_YET implemented).
And please note another QA problem. The macro get_user() is
defined in *many* different places:
driver/block/directhd.c
arch/segment.h
kernel/signal.c
net/socket.c
It should *only* be defined in one place--a common header include
file. Better yet, implement get_user_long() as a true function and
*not* a macro.
My apologies if this has already been mentioned on the list. I was
unable to find the linux-8086 archives.