[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2003131128180.30076@pobox.suse.cz>
Date: Fri, 13 Mar 2020 12:10:04 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Vince Weaver <vincent.weaver@...ne.edu>,
Dave Jones <dsj@...com>, Jann Horn <jannh@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 01/14] x86/dumpstack: Add SHOW_REGS_IRET mode
On Thu, 12 Mar 2020, Josh Poimboeuf wrote:
> Now that __show_regs() has the concept of "modes" to indicate which
> registers should be displayed, replace show_iret_regs() with a new
> SHOW_REGS_IRET mode. This is only a cleanup and doesn't change any
> behavior.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
> ---
> arch/x86/include/asm/kdebug.h | 1 +
> arch/x86/kernel/dumpstack.c | 27 ++++++++++-----------------
> arch/x86/kernel/process_64.c | 7 ++++++-
> 3 files changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/arch/x86/include/asm/kdebug.h b/arch/x86/include/asm/kdebug.h
> index 247ab14c6309..6112227368e7 100644
> --- a/arch/x86/include/asm/kdebug.h
> +++ b/arch/x86/include/asm/kdebug.h
> @@ -23,6 +23,7 @@ enum die_val {
> };
>
> enum show_regs_mode {
> + SHOW_REGS_IRET,
> SHOW_REGS_SHORT,
> /*
> * For when userspace crashed, but we don't think it's our fault, and
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index ae64ec7f752f..8a9ff25779ec 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -126,15 +126,8 @@ void show_ip(struct pt_regs *regs, const char *loglvl)
> show_opcodes(regs, loglvl);
> }
>
> -void show_iret_regs(struct pt_regs *regs)
> -{
> - show_ip(regs, KERN_DEFAULT);
> - printk(KERN_DEFAULT "RSP: %04x:%016lx EFLAGS: %08lx", (int)regs->ss,
> - regs->sp, regs->flags);
> -}
> -
There is also declaration of show_iret_regs() in
arch/x86/include/asm/kdebug.h which can be removed now.
Miroslav
Powered by blists - more mailing lists