copy_from_user
Hi,
Suppose kernel tries to do copy_from_user from a pointer that does not
have any mapping. i.e. not in any VMA (and not in stack area too..). Now (for 1386)access_ok --> __range_ok
Suppose the 'from' ptr is within range then how kernel is making sure that 'from' is invalid ??
The page fault handler will see that 'from' has no mapping and it will die..
Please help
Amol
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/
Quoted 2 lines · --- Amol Kumar Lad
Suppose kernel tries to do
copy_from_userfrom a pointer
that does not have any mapping. i.e. not in any VMA (and not
in
Quoted 7 lines
stack area too..).
Now (for 1386)access_ok-->__range_ok
Suppose the 'from' ptr is within range then how kernel is making sure that 'from' is invalid ??
The page fault handler will see that 'from' has no mapping and it will die..
I believe this is handled using the 'fixup' code in __copy_user_zeroing().
I don't understand the code well though, but I do know that it works :)
-Ravi.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/
yeah..u are right... how stupid of me... I should have read whole function... I thought..aceess_ok should make such check...
thanks
Amol
Quoted 19 lines · Ravi
Quoted 2 lines · --- Amol Kumar Lad
Suppose kernel tries to do
copy_from_userfrom a pointer
that does not have any mapping. i.e. not in any VMA (and notin
Quoted 7 lines
stack area too..).
Now (for 1386)access_ok-->__range_ok
Suppose the 'from' ptr is within range then how kernel is making sure that 'from' is invalid ??
The page fault handler will see that 'from' has no mapping and it will die..I believe this is handled using the 'fixup' code in
__copy_user_zeroing().
I don't understand the code well though, but I do know that it works :)
Quoted 6 lines
-Ravi.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/