lkml.org 
[lkml]   [2015]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Generic page fault (Was: libsigsegv ....)
From
Date
On Sat, 2015-02-28 at 13:49 -0800, Linus Torvalds wrote:

.../...

> - we handle write faults separately (see the first part of access_error()
>
> - so now we know it was a read or an instruction fetch
>
> - if PF_PROT is set, that means that the present bit was set in the
> page tables, so it must have been an exec access to a NX page
>
> - otherwise, we just say "PROTNONE means no access, otherwise
> populate the page tables"
>
> .. and if it turns out that it was a PF_INSTR to a NX page, we'll end
> up taking the page fault *again* after it's been populated, and now
> since the page table was populated, the access_error() will catch it
> with the PF_PROT case.
>
> Or something like that. I might have screwed up some detail, but it
> should all work.

I see, it should work yes, I'll still add that FAULT_FLAG_EXEC for
those who can tell reliably but it shouldn't hurt for x86 to not set it.

Cheers,
Ben.


> Linus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html




\
 
 \ /
  Last update: 2015-03-01 00:01    [W:0.063 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site