linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: BlaisorBlade <blaisorblade_spam@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] fix writing into /dev/kmem
Date: Mon, 01 Mar 2004 20:11:10 -0500	[thread overview]
Message-ID: <200403020111.i221BAM9025673@ccure.user-mode-linux.org> (raw)
In-Reply-To: Your message of "Sun, 29 Feb 2004 17:20:19 +0100." <200402291720.19359.blaisorblade_spam@yahoo.it>

blaisorblade_spam@yahoo.it said:
> the i386 Oopses, normally, kill only the thread which triggered the
> fault -  while instead Uml panics altogether. Cannot this be changed
> at  arch/um/kernel/trap_kern.c:segv()? 

If there's an unexplained kernel mode access fault, anything could be wrong.

I don't see that it's reasonable to just kill the process when kernel data
could be corrupted as far as we know.

I don't know why x86 thinks it can just kill the process.

> By the way: in handle_page_fault(), there is some dead code (attached
> is the  removal patch).

That shouldn't be dead code.  I think it should be attached to the VM_FAULT_OOM
case - I copied it from x86, so check there to be sure.

> I also do not understand the loop around handle_mm_fault call, but I
> could be  wrong: are you sure that after a successful handle_mm_fault
> (i.e. a major or  minor fault) pte_present(*pte) could be false? If
> handle_mm_fault is not  successful, we exit the loop anyway. 

It's possible that the page could have been swapped out between fixing the
fault and the return from handle_mm_fault.  Way back in history, I had a 
check for the same fault happening twice in a row, and panicing if it happened.
This was when UML's fault handling still needed debugging.  To prevent the
case I just mentioned from triggering that panic, I added the loop to make sure
the page was good before returning to userspace.

				Jeff



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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:[~2004-03-02  0:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-29  2:36 [uml-devel] [PATCH] fix writing into /dev/kmem Jeff Dike
2004-02-29 12:25 ` BlaisorBlade
2004-03-02  1:31   ` Jeff Dike
2004-03-02 18:41     ` BlaisorBlade
2004-03-04  2:02       ` Jeff Dike
2004-03-08 11:50         ` BlaisorBlade
2004-02-29 16:20 ` BlaisorBlade
2004-03-02  1:11   ` Jeff Dike [this message]
2004-03-02  1:31   ` Jeff Dike

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=200403020111.i221BAM9025673@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=blaisorblade_spam@yahoo.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox