From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbdKTUmP (ORCPT ); Mon, 20 Nov 2017 15:42:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbdKTUmN (ORCPT ); Mon, 20 Nov 2017 15:42:13 -0500 Date: Mon, 20 Nov 2017 14:42:12 -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: <20171120204212.6rlbhh4btxqnjanm@treble> References: <01c7223352405fe6d55d1ea7c0ff1d7282c30cc7.1511195781.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <01c7223352405fe6d55d1ea7c0ff1d7282c30cc7.1511195781.git.luto@kernel.org> 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.39]); Mon, 20 Nov 2017 20:42:13 +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 09:07:33AM -0800, Andy Lutomirski wrote: > +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) Can you make it lowercase for consistency with the other in_*_stack() functions? For example, in_irq_stack() is all lowercase even though "IRQ" is normally written in uppercase. But also, I'm wondering whether this get_stack_info() support is even really needed. As currently written, the trampoline code doesn't have any ORC data associated with it. So the unwinder would never have the need to actually read the SYSENTER stack. You _could_ add an UNWIND_HINT_IRET_REGS annotation after the simulated iret frame is written, which would allow the unwinder to dump those regs when unwinding from an NMI. But there's only a tiny window where that would be possible: only a few instructions. I'm not sure that would be worth the effort, unless we got to the point where we expect to have 100% unwinder coverage. But that's currently unrealistic anyway because of generated code and runtime patching. -- Josh