lkml.org 
[lkml]   [2015]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 21/34] x86, pkeys: dump PKRU with other kernel registers
    From
    Date

    From: Dave Hansen <dave.hansen@linux.intel.com>

    I'm a bit ambivalent about whether this is needed or not.

    Protection Keys never affect kernel mappings. But, they can
    affect whether the kernel will fault when it touches a user
    mapping. But, the kernel doesn't touch user mappings without
    some careful choreography and these accesses don't generally
    result in oopses.

    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    ---

    b/arch/x86/kernel/process_64.c | 2 ++
    1 file changed, 2 insertions(+)

    diff -puN arch/x86/kernel/process_64.c~pkeys-30-kernel-error-dumps arch/x86/kernel/process_64.c
    --- a/arch/x86/kernel/process_64.c~pkeys-30-kernel-error-dumps 2015-12-03 16:21:27.874773264 -0800
    +++ b/arch/x86/kernel/process_64.c 2015-12-03 16:21:27.877773400 -0800
    @@ -116,6 +116,8 @@ void __show_regs(struct pt_regs *regs, i
    printk(KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2);
    printk(KERN_DEFAULT "DR3: %016lx DR6: %016lx DR7: %016lx\n", d3, d6, d7);

    + if (boot_cpu_has(X86_FEATURE_OSPKE))
    + printk(KERN_DEFAULT "PKRU: %08x\n", read_pkru());
    }

    void release_thread(struct task_struct *dead_task)
    _

    \
     
     \ /
      Last update: 2015-12-04 02:41    [W:2.555 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site