Agreed.
Another thing I found while reading namei.c:
static inline int do_getname(const char *filename, char *page)
{
int retval;
unsigned long len = PAGE_SIZE;
if ((unsigned long) filename >= TASK_SIZE) {
if (!segment_eq(get_fs(), KERNEL_DS))
return -EFAULT;
} else if (TASK_SIZE - (unsigned long) filename < PAGE_SIZE)
len = TASK_SIZE - (unsigned long) filename;
retval = strncpy_from_user((char *)page, filename, len);
if (retval > 0) {
This looks dubious too me. Isn't the split between kernel and user
memory architecture dependent, and who says that the user task is lower
than the kernel memory? I think this test should be moved into
asm/uaccess.h.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html