Messages in this thread | | | Date | Mon, 28 Jun 2010 16:37:15 +0200 | From | Jakub Jelinek <> | Subject | Re: Q: sys_futex() && timespec_valid() |
| |
On Mon, Jun 28, 2010 at 03:58:25PM +0200, Oleg Nesterov wrote: > Honestly, it looks a bit strange to me that you blame the correct code,
Whether that is correct or not is what is being disputed.
> and at the same time you ignore the test-case which hangs because the > kernel returns -EFAULT saying that this is the caller's problem.
The userspace code reads the abstime->tv_nsec value, so if it wouldn't be valid address, the code would already segfault. And that's fine, POSIX certainly allows that, reporting EFAULT isn't required. Well, it doesn't read abstime->tv_sec in the assembly version, so if you try hard, you can avoid the segfault, yet get EFAULT from futex syscall by putting abstime 8 bytes before start of some page with previous page not mmapped.
Jakub
| |