All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] a question about sigsetjmp() in copy_from/to_user()
@ 2005-09-27 14:06 Young Koh
  2005-09-27 17:28 ` Jeff Dike
  2005-09-28  8:41 ` Blaisorblade
  0 siblings, 2 replies; 20+ messages in thread
From: Young Koh @ 2005-09-27 14:06 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi,

i have a question about copy_from/to_user() implementation in skas mode.

as my understanding,
when copy_from/to_user() is  invoked, before the address translation
happens, UML kernel calls sigsetjmp() to come back when there is a
segmentation fault. and if there is, it seems that the system call an
application triggered eventually returns EFAULT. then, it seems to me
that sigsetjmp() is to catch the error when the application gave the
invalid user space address.

my question is, if so, shouldn't the error be caught when UML kernel
translates the user space address to the kernel space address? i mean,
UML kernel must know the valid memory regions and if the address is
out of the valid regions, then it knows the address is invalid before
UML tries to access the address. why should it use sigsetjmp() and let
a segfault occur?

Thank you in advance,

-Young


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-10-03 21:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-27 14:06 [uml-devel] a question about sigsetjmp() in copy_from/to_user() Young Koh
2005-09-27 17:28 ` Jeff Dike
2005-09-28 11:59   ` Blaisorblade
2005-09-28 13:47     ` Young Koh
2005-09-28 14:50       ` Jeff Dike
2005-09-28 19:25         ` Young Koh
2005-09-29 12:09           ` Blaisorblade
2005-09-30 15:08             ` Young Koh
2005-09-30 15:44               ` Geert Uytterhoeven
2005-10-02  1:03             ` Jeff Dike
2005-10-02 10:23               ` Blaisorblade
2005-10-02 18:31                 ` Jeff Dike
2005-10-03 18:35                   ` Blaisorblade
2005-10-03 20:38                     ` Jeff Dike
2005-09-28 16:09     ` Jeff Dike
2005-09-28 17:26       ` Blaisorblade
2005-09-28 18:43         ` Jeff Dike
2005-09-28  8:41 ` Blaisorblade
2005-09-28 14:22   ` Young Koh
2005-09-28 16:43     ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.