Re: 2.6.8.1-mm4

From: Alan Cox
Date: Mon Aug 23 2004 - 15:58:12 EST


On Llu, 2004-08-23 at 19:21, Tomasz Torcz wrote:
> >- This kernel has an x86 patch which alters the copy_*_user() functions so
> > they will return -EFAULT on a fault rather than the number of bytes which
> > remain to be copied. This is a bit of an experiment, because this seems to
> > be the preferred API for those functions. It's a see-what-breaks thing.
> >
>
> Things appear to broke. Sometimes kernel starts to spit page allocation
> failures into log for few minutes, despite memory beeing available:

The kernel relies on copy_from_user returning the number of bytes copied
so no suprise there. In fact if it returns -EFAULT and you've not
reworked all the drivers (including out of kernel serial drivers in
particular) you get a security hole because you can move the buffer
pointers backwards.

Other code uses it to decide what object was passed for compatibility
too.

Alan


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