From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbcEYLcp (ORCPT ); Wed, 25 May 2016 07:32:45 -0400 Received: from mail.skyhub.de ([78.46.96.112]:39754 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbcEYLco (ORCPT ); Wed, 25 May 2016 07:32:44 -0400 Date: Wed, 25 May 2016 13:32:40 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Kees Cook , Brian Gerst Subject: Re: [PATCH 4/7] x86/dumpstack: If addr_limit is non-default, display it Message-ID: <20160525113240.GB4420@pd.tnic> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2016 at 03:48:41PM -0700, Andy Lutomirski wrote: > This will help debug OOPSes related to USER_DS vs KERNEL_DS. > > Signed-off-by: Andy Lutomirski > --- > arch/x86/kernel/dumpstack_32.c | 4 ++++ > arch/x86/kernel/dumpstack_64.c | 5 +++++ > 2 files changed, 9 insertions(+) > > diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c > index 464ffd69b92e..5dbb08fd8291 100644 > --- a/arch/x86/kernel/dumpstack_32.c > +++ b/arch/x86/kernel/dumpstack_32.c > @@ -124,8 +124,12 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, > void show_regs(struct pt_regs *regs) > { > int i; > + struct thread_info *ti = current_thread_info(); > > show_regs_print_info(KERN_EMERG); > + if (ti->addr_limit.seg != TASK_SIZE_MAX) > + printk(KERN_DEFAULT "task.addr_limit: 0x%lx\n", > + ti->addr_limit.seg); I guess we can dump that unconditionally just to be consistent and so that all oopses look the same, i.e., with that line always present. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.