lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 06 Jan 2016 16:01:34 -0800 From: Dave Hansen <dave@...1.net> To: linux-kernel@...r.kernel.org Cc: linux-mm@...ck.org, x86@...nel.org, Dave Hansen <dave@...1.net>, dave.hansen@...ux.intel.com Subject: [PATCH 21/31] x86, pkeys: dump PKRU with other kernel registers From: Dave Hansen <dave.hansen@...ux.intel.com> Protection Keys never affect kernel mappings. But, they can affect whether the kernel will fault when it touches a user mapping. The kernel doesn't touch user mappings without some careful choreography and these accesses don't generally result in oopses. But, if one does, we definitely want to have PKRU available so we can figure out if protection keys played a role. Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com> Reviewed-by: Thomas Gleixner <tglx@...utronix.de> --- 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 2016-01-06 15:50:12.265456034 -0800 +++ b/arch/x86/kernel/process_64.c 2016-01-06 15:50:12.268456170 -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) _ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists