All of lore.kernel.org
 help / color / mirror / Atom feed
From: Young Koh <young.koh@gmail.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] a question about sigsetjmp() in copy_from/to_user()
Date: Wed, 28 Sep 2005 09:47:41 -0400	[thread overview]
Message-ID: <3524bf1f05092806477e590930@mail.gmail.com> (raw)
In-Reply-To: <200509281359.48449.blaisorblade@yahoo.it>

Thank you for your reply, but still have one more.

(i think i forgot to reply to the mailing list with the previous
email, so, i'm attaching the text)

On 9/28/05, Jeff Dike <jdike@addtoit.com> wrote:
> On Tue, Sep 27, 2005 at 08:56:51PM -0400, Young Koh wrote:
> > 1) if the address is fine, shouldn't the access that causes a segfault
> > be regarded as a page fault? that is, shouldn't it be handled by UML
> > kernel and UML proceeds normally instead of returning an error to the
> > application? (because the app gave the proper address)
>
> No.
>
> It's akin to a piece of memory all of a sudden going bad.  You allocated the
> memory and thought you could use it, but when you try, it turns out not
> to be there.

yes, i think memory can go bad if 1) it cannot be allocated because of
filesystem full or similar reasons as Jeff described, or 2) it was
allocated once but could have been swapped.

in case of 1) it should be more like kernel panic rather than just a
system call error, i think? because kernel cannot allocate any more
memory, which kernel is supposed to use.

in case of 2) this is a real fault, so, the seg fault handler of UML
kernel is supposed to load the swapped page and UML kernel proceeds
normally? (as Blaisorblade described in the other mail, by calling
handle_page_fault()?)

Thank you,

-Young

>
> > 2) i thought that the file used for UML memory is created when a UML
> > process is initialized.
> > then, the memory file is not created for the fixed size at first, but
> > it changes the size according to the UML memory usage?
>
> It's not fully allocated.  It starts off sparse and gets allocated on
> the host as the guest's memory usage increases.
>
> > 3) is it the only case sigsetjmp() protected from?
>
> I believe so, but am not positive.
>
>                                 Jeff
>


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

  reply	other threads:[~2005-09-28 13:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3524bf1f05092806477e590930@mail.gmail.com \
    --to=young.koh@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.