From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdK0NNM (ORCPT ); Mon, 27 Nov 2017 08:13:12 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39042 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751867AbdK0NNK (ORCPT ); Mon, 27 Nov 2017 08:13:10 -0500 X-Google-Smtp-Source: AGs4zMYJXn6pGRpZkvu/H/vrc/UOEQy26WfDsOHqrPkWDqk8rxoDk5UXEcDlMoF5/E/FUF2F7RQYnQ== Date: Mon, 27 Nov 2017 14:13:06 +0100 From: Ingo Molnar To: Josh Poimboeuf Cc: Andy Lutomirski , Thomas Gleixner , X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds Subject: Re: [PATCH] x86/orc: Don't bail on stack overflow Message-ID: <20171127131306.3bbzxtgghvqsdd6j@gmail.com> References: <7b2c3ad96fb62afbc095bd7ba8a93022480153cb.1511630836.git.luto@kernel.org> <20171126024031.uxi4numpbjm5rlbr@treble> <20171127093842.xppvp53ozr2av4lg@gmail.com> <20171127124525.eq7j2fvozeoqybvs@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171127124525.eq7j2fvozeoqybvs@treble> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Josh Poimboeuf wrote: > On Mon, Nov 27, 2017 at 10:38:42AM +0100, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > On Sat, Nov 25, 2017 at 04:16:23PM -0800, Andy Lutomirski wrote: > > > > Can you send me whatever config and exact commit hash generated this? > > > > I can try to figure out why it failed. > > > > > > Sorry, I've been traveling. I just got some time to take a look at > > > this. I think there are at least two unwinder issues here: > > > > > > - It doesn't deal gracefully with the case where the stack overflows and > > > the stack pointer itself isn't on a valid stack but the > > > to-be-dereferenced data *is*. > > > > > > - The oops dump code doesn't know how to print partial pt_regs, for the > > > case where if we get an interrupt/exception in *early* entry code > > > before the full pt_regs have been saved. > > > > > > (Andy, I'm not quite sure about your patch, and whether it's still > > > needed after these patches. I'll need to look at it later when I have > > > more time.) > > > > > > I attempted to fix both of the issues with the below patch. Thomas or > > > Ingo, can you test to see if this gets rid of the question marks? > > > > > > I can split it up into proper patches next week. I'm assuming this > > > isn't holding up the KAISER merge? > > > > It's not holding up the Kaiser merge, but good debuggability of weird crashes is a > > really good thing, so I constructed a changelog and picked up this patch as a > > single commit, and added your Signed-off-by, if that's OK with you. > > > > Will only push it out if it passes testing. > > The commit log looks good, though there's a CONFIG_FRAME_POINTER build > failure. Can you fold in this fix? > > diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c > index 7dd0d2a0d142..77835bc021c7 100644 > --- a/arch/x86/kernel/stacktrace.c > +++ b/arch/x86/kernel/stacktrace.c > @@ -102,7 +102,7 @@ __save_stack_trace_reliable(struct stack_trace *trace, > for (unwind_start(&state, task, NULL, NULL); !unwind_done(&state); > unwind_next_frame(&state)) { > > - regs = unwind_get_entry_regs(&state, NULL); > + regs = unwind_get_entry_regs(&state); > if (regs) { > /* > * Kernel mode registers on the stack indicate an Done, thanks! Ingo