From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753197AbdKTVzz (ORCPT ); Mon, 20 Nov 2017 16:55:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753151AbdKTVzx (ORCPT ); Mon, 20 Nov 2017 16:55:53 -0500 Date: Mon, 20 Nov 2017 15:55:50 -0600 From: Josh Poimboeuf To: Andy Lutomirski Cc: X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds Subject: Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack Message-ID: <20171120215550.2yiukhcnts5g77ho@treble> References: <01c7223352405fe6d55d1ea7c0ff1d7282c30cc7.1511195781.git.luto@kernel.org> <20171120204212.6rlbhh4btxqnjanm@treble> <20171120210050.mq6hrzomvrd7kuaf@treble> <20171120212738.rdevfne2vrruyvt4@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 20 Nov 2017 21:55:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: > >> >> but, more importantly, the OOPS unwinder will just bail without this > >> >> patch. With the patch, we get a valid unwind, except that everything > >> >> has a ? in front. > >> > > >> > Hm. I can't even fathom how that's possible. Are you talking about the > >> > "unwind from NMI to SYSENTER stack" path? Or any unwind to a syscall? > >> > Either way I'm baffled... If the unwinder only encounters the SYSENTER > >> > stack at the end, how could that cause everything beforehand to have a > >> > question mark? > >> > >> I mean that, if I put a ud2 or other bug in the code that runs on the > >> SYSENTER stack, without this patch, I get a totally blank call trace. > > > > I would expect a blank call trace either way... > > Try making sync_regs use a few kB of stack space or, better yet, call > a non-inlined function that uses too much stack. You mean overflow the exception stack? I still don't see how that would do it. If you could show a specific example, with splats from before/after, that would be helpful. Because I still have no idea how this patch could possibly help. -- Josh