* copy_from_user
@ 2002-12-21 23:26 Amol Kumar Lad
2002-12-23 1:21 ` copy_from_user Ravi
0 siblings, 1 reply; 3+ messages in thread
From: Amol Kumar Lad @ 2002-12-21 23:26 UTC (permalink / raw)
To: linux-mm
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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: copy_from_user
2002-12-21 23:26 copy_from_user Amol Kumar Lad
@ 2002-12-23 1:21 ` Ravi
2002-12-23 15:02 ` copy_from_user Amol Kumar Lad
0 siblings, 1 reply; 3+ messages in thread
From: Ravi @ 2002-12-23 1:21 UTC (permalink / raw)
To: Amol Kumar Lad, linux-mm
--- Amol Kumar Lad <amolk@ishoni.com> wrote:
> 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..
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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: copy_from_user
2002-12-23 1:21 ` copy_from_user Ravi
@ 2002-12-23 15:02 ` Amol Kumar Lad
0 siblings, 0 replies; 3+ messages in thread
From: Amol Kumar Lad @ 2002-12-23 15:02 UTC (permalink / raw)
To: Ravi; +Cc: linux-mm
yeah..u are right... how stupid of me... I should have read whole
function... I thought..aceess_ok should make such check...
thanks
Amol
On Sun, 2002-12-22 at 20:21, Ravi wrote:
>
> --- Amol Kumar Lad <amolk@ishoni.com> wrote:
>
> > 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..
>
> 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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-23 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-21 23:26 copy_from_user Amol Kumar Lad
2002-12-23 1:21 ` copy_from_user Ravi
2002-12-23 15:02 ` copy_from_user Amol Kumar Lad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox