Re: Why system call need to copy the date from the userspace before using it

From: Hacksaw
Date: Sat Apr 16 2005 - 03:31:47 EST


>if you want actual concrete examples, let me know.
I'd love a few, but maybe privately?


I can certainly see where always copying is simpler; I certainly consider this
to be an optimization, which must be looked at carefully, lest you end up with
that which speed things up a little, but adds a big maintenance headache.

But this strikes me as a potentially big speed up for movement through
devices. (Or is there already a mechanism for that?)

>It checks if the LAST page belongs to userland, and fails if not;
I can't claim to know how memory assignment goes. I suppose that this
statement means that the address space the userland program sees is continuous?

If not I could see a scenario where that would allow someone to get at data
that isn't theirs, by allocating around until they got an chunk far up in
memory, then just specified a start address way lower with the right size to
end up on their chunk.

I'm assuming this isn't a workable scenario, right?
--
You are in a maze of twisty passages, all alike. Again.
http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD


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