From: Linus Torvalds <torvalds@linux-foundation.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: Generic page fault (Was: libsigsegv ....)
Date: Sat, 28 Feb 2015 16:41:41 -0800 [thread overview]
Message-ID: <CA+55aFw+K6aev6JPTiYxWjtJS0O8+MUwC-5=O4Gb+0mCd+tOfQ@mail.gmail.com> (raw)
In-Reply-To: <1425164559.4645.157.camel@kernel.crashing.org>
On Sat, Feb 28, 2015 at 3:02 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>
> Anyway, here's the current patch:
Ok, I think I like this approach better.
Your FAULT_FLAG_EXEC handling is wrong, though. It shouldn't check
VM_WRITE, it should check VM_EXEC. A bit too much copy-paste ;)
Btw, it's quite possible that we could just do all the PF_PROT
handling at the x86 level, before even calling the generic fault
handler. It's not like we even need the vma or the mm semaphore: if
it's a non-write protection fault, we always SIGSEGV. So why even
bother getting the locks and looking up the page tables etc?
Now, that PF_PROT handling isn't exactly performance-critical, but it
might help to remove the odd x86 special case from the generic code.
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-03-01 0:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1422361485.6648.71.camel@opensuse.org>
[not found] ` <54C78756.9090605@suse.cz>
[not found] ` <alpine.LSU.2.11.1501271347440.30227@nerf60.vanv.qr>
[not found] ` <1422364084.6648.82.camel@opensuse.org>
[not found] ` <s5h7fw8hvdp.wl-tiwai@suse.de>
[not found] ` <CA+55aFyzy_wYHHnr2gDcYr7qcgOKM2557bRdg6RBa=cxrynd+Q@mail.gmail.com>
[not found] ` <CA+55aFxRnj97rpSQvvzLJhpo7C8TQ-F=eB1Ry2n53AV1rN8mwA@mail.gmail.com>
[not found] ` <CAMo8BfLsKCV_2NfgMH4k9jGOHs_-3=NKjCD3o3KK1uH23-6RRg@mail.gmail.com>
[not found] ` <CA+55aFzQ5QEZ1AYauWviq1gp5j=mqByAtt4fpteeK7amuxcyjw@mail.gmail.com>
[not found] ` <1422836637.17302.9.camel@au1.ibm.com>
[not found] ` <CA+55aFw9sg7pu9-2RbMGyPv5yUtcH54QowoH+5RhWqpPYg4YGQ@mail.gmail.com>
2015-02-28 7:12 ` Benjamin Herrenschmidt
2015-02-28 7:14 ` Benjamin Herrenschmidt
2015-02-28 10:36 ` Benjamin Herrenschmidt
2015-02-28 19:56 ` Linus Torvalds
2015-02-28 19:58 ` Linus Torvalds
2015-02-28 21:14 ` Benjamin Herrenschmidt
2015-02-28 21:49 ` Linus Torvalds
2015-02-28 22:49 ` Benjamin Herrenschmidt
2015-02-28 22:16 ` Benjamin Herrenschmidt
2015-02-28 22:50 ` Benjamin Herrenschmidt
2015-02-28 23:02 ` Benjamin Herrenschmidt
2015-03-01 0:41 ` Linus Torvalds [this message]
2015-03-01 3:57 ` Benjamin Herrenschmidt
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='CA+55aFw+K6aev6JPTiYxWjtJS0O8+MUwC-5=O4Gb+0mCd+tOfQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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