lkml.org 
[lkml]   [2015]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 10/12] x86, pkeys: differentiate Protection Key faults from normal
    From
    Date


    ---

    b/arch/x86/mm/fault.c | 9 +++++++++
    1 file changed, 9 insertions(+)

    diff -puN arch/x86/mm/fault.c~pkeys-12-fault-differentiation arch/x86/mm/fault.c
    --- a/arch/x86/mm/fault.c~pkeys-12-fault-differentiation 2015-05-07 10:31:44.570330979 -0700
    +++ b/arch/x86/mm/fault.c 2015-05-07 10:31:44.573331114 -0700
    @@ -1009,6 +1009,15 @@ int show_unhandled_signals = 1;
    static inline int
    access_error(unsigned long error_code, struct vm_area_struct *vma)
    {
    + /*
    + * Access or read was blocked by protection keys. We do
    + * this check before any others because we do not want
    + * to, for instance, confuse a protection-key-denied
    + * write with one for which we should do a COW.
    + */
    + if (error_code & PF_PK)
    + return 1;
    +
    if (error_code & PF_WRITE) {
    /* write, present and write, not present: */
    if (unlikely(!(vma->vm_flags & VM_WRITE)))
    _

    \
     
     \ /
      Last update: 2015-05-07 20:01    [W:4.426 / U:1.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site