Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbbLHST6 (ORCPT ); Tue, 8 Dec 2015 13:19:58 -0500 Received: from www.linutronix.de ([62.245.132.108]:51567 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716AbbLHST5 (ORCPT ); Tue, 8 Dec 2015 13:19:57 -0500 Date: Tue, 8 Dec 2015 19:19:08 +0100 (CET) From: Thomas Gleixner To: Dave Hansen cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, dave.hansen@linux.intel.com Subject: Re: [PATCH 21/34] x86, pkeys: dump PKRU with other kernel registers In-Reply-To: <20151204011453.007731D7@viggo.jf.intel.com> Message-ID: References: <20151204011424.8A36E365@viggo.jf.intel.com> <20151204011453.007731D7@viggo.jf.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1639 Lines: 43 On Thu, 3 Dec 2015, Dave Hansen wrote: > > From: Dave Hansen > > 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. Well, if we miss some careful choreography at some place, this information is going to be helpful. Reviewed-by: Thomas Gleixner > Signed-off-by: Dave Hansen > --- > > 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) > _ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/