Re: [PATCH][COMPAT] compat_sys_fcntl{,64} 1/9 Generic part

From: Anton Blanchard (anton@samba.org)
Date: Sat Mar 01 2003 - 04:12:24 EST


> Now there used to be some code that did:
>
> if (get_user(a, &userstruct->firstmember) ||
> __get_user(b, &userstruct->secondmember))
> return -EFAULT;
>
> Assuming that the access_ok in get_user for sizeof(firstmember) covers
> secondmember too which doesn't do access_ok in __get_user. This only
> works assuming it should handle 64bit pointers when there is a memory
> hole at the end of the user process space, otherwise it could
> access kernel pages directly after TASK_SIZE. x86-64 has a big enough
> hole there, i assume sparc64 and ia64 have too, but i don't know
> about the other 64bit ports.

Yeah there are a bunch of those in the ioctl and syscall translation
code that annoys me. ppc64 is safe too, but its not something we should
rely on.

Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:16 EST