From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] enable interrupts in user path of page fault.
Date: Thu, 7 Jun 2007 19:28:07 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0706071925260.4205@woody.linux-foundation.org> (raw)
In-Reply-To: <20070607185851.faf36f95.akpm@linux-foundation.org>
On Thu, 7 Jun 2007, Andrew Morton wrote:
>
> Interrupts got disabled here because do_page_fault() is an
> interrupt-disabling trap, yes?
Yes - and it has to be: we want to disable preemption and interrupts that
can fault on the vmalloc space, until we've at least saved away %cr2. We
had bugs in that area before.
> The patch looks reasonable to me: a slight reduction in interrupt-off
> latency when really weird things are happening.
I applied it as obviously correct.
> The patch also breaks things, I think: if userspace is running with
> interrupts disabled and tries to access kernel memory it will presently
> whizz through the kernel without ever enabling interrupts. With this
> change, the kernel will now enable interrupts, which is presumably not what
> the application wanted.
Well, we *do* enable interrupts for real page faults anyway, and this
whole code just triggers for the case where we'd send a SIGSEGV. If some
silly app really thought it could do that with interrupts disabled, it was
wrong before too (we'd hit a reschedule point and enable them there
anyway).
Linus
prev parent reply other threads:[~2007-06-08 2:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 3:34 Steven Rostedt
2007-06-08 1:58 ` Andrew Morton
2007-06-08 2:06 ` Steven Rostedt
2007-06-08 2:29 ` Linus Torvalds
2007-06-08 2:28 ` Linus Torvalds [this message]
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=alpine.LFD.0.98.0706071925260.4205@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®