public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86 page fault handler not interrupt safe
Date: Mon, 07 May 2001 15:54:17 -0400	[thread overview]
Message-ID: <3AF6FD69.5654B88B@didntduck.org> (raw)
In-Reply-To: <Pine.LNX.4.21.0105071003330.12733-100000@penguin.transmeta.com>

Linus Torvalds wrote:
> 
> On Mon, 7 May 2001, Alan Cox wrote:
> >
> > That is nice. I hadn't thought about doing it that way. It still has the problem
> > if %cr2 is corrupted by a vmalloc fault but it cleans up my other code paths
> > nicely.
> 
> See about "corruption" in previous email. It doesn't exist.
> 
> For better debugging, we should probably walk the whole init_mm page table
> tree when we take the fault, so this patch does that too: it
> unconditionally copies the init_mm page table entries into the current
> page table, while at the same time checking that they exist (including the
> very last level that we didn't use to check at all).
> 
> This means that if you access one page past a vmalloc'ed area, you will
> get a nice oops instead of endless page faults that will fix up the page
> tables with mappings that already exist.

This patch will still cause the user process to seg fault: The error
code on the stack will not match the address in %cr2.

	user fault (cr2=useraddr, error_code=5 or 7)
	interrupt
		vmalloc fault (cr2=vmallocaddr, error_code=0 or 2)
			handle vmalloc fault
			iret
		iret
	handle user fault (cr2=vmallocaddr, error_code=5 or 7)

We then fall down to find_vma() which will fail and then send SIGSEGV to
the user process.

--

				Brian Gerst

  parent reply	other threads:[~2001-05-07 19:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-06  1:26 [PATCH] x86 page fault handler not interrupt safe Brian Gerst
2001-05-07  0:53 ` Linus Torvalds
2001-05-07  3:54   ` Brian Gerst
2001-05-07 10:45   ` Alan Cox
2001-05-07 14:57     ` Brian Gerst
2001-05-07 15:07       ` Alan Cox
2001-05-07 17:12         ` Linus Torvalds
2001-05-07 17:27           ` David Woodhouse
2001-05-07 19:54           ` Brian Gerst [this message]
2001-05-07 20:16             ` Linus Torvalds
2001-05-07 21:37           ` Alan Cox
2001-05-07 22:52           ` Jesper Juhl
2001-05-07 18:35         ` Anton Altaparmakov
2001-05-07 16:51     ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2001-05-07 17:32 Dunlap, Randy
2001-05-07 17:51 ` David Woodhouse
     [not found] <D5E932F578EBD111AC3F00A0C96B1E6F07DBE26F@orsmsx31.jf.intel .com>
2001-05-07 17:52 ` Anton Altaparmakov
     [not found] <3AF712D5.5D712E0F@didntduck.org>
2001-05-07 21:44 ` Linus Torvalds
2001-05-07 22:10   ` Brian Gerst
2001-05-08 10:45   ` Alan Cox
2001-05-08 16:45     ` Linus Torvalds
2001-05-09 22:12       ` Brian Gerst
2001-05-07 21:53 ` Nigel Gamble
2001-05-07 21:58 Anton Altaparmakov

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=3AF6FD69.5654B88B@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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