Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1598200ybh; Fri, 13 Mar 2020 04:11:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsf50/73JOD/rhNNjVhAXX0TYR+3Ty04LQYU+gektlVdrws0shCUdS8ncM6uzLbCP6WVIF+ X-Received: by 2002:a9d:5a09:: with SMTP id v9mr9919082oth.214.1584097865733; Fri, 13 Mar 2020 04:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584097865; cv=none; d=google.com; s=arc-20160816; b=dfsVzQUjP2AoIotQCfYDr5j5FioEJHOWbj5LFjc+9BHeqNu2Ea1yUuoRIjD8iEpoLy AjJrFpy1v8Wz0/JHyxcK2ZrpVMRRhc5wCzFQFcCJsrzGiWOV4yHA6jomFWjGFkaQaKM5 TSK57hR2Idbfu5AJ1yIB794MiGWZnULgfZLhDxePG5WVXbJ4CWPUJ5xB8XDGuR90+bki 0EaNnPDdMBKyqSWxb/eYlDcl0y1nyqWpTrGs/iU9ljqO6kZxknIi91m2veChpgaEnaSC tMZg3POZTr6O1LX5oYcYiJkAvSZivducdSnLidrSY3BCABpwo0PIQ+VivTjtqCuQKlEA RiRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=pHr5eqxdf5ZyDRNSH04/NuOdZ3OUup/+NWDzohRvapI=; b=S4OqSzeKOgM8wXqdIfgXGE07xF8b+4bwLLA+6xBwO5kziVw5RihVtYfKruFhga0vVD 4BlXzTQMReGmpEhu9B5B14pYV68mWzoKXL6qeUDTfDSartzr5pL5XmPymGDwCd0lJX3i jV1jRvgpaWPsubbzr8sM9NLrrJKsIgUZLzPWCj8jas9Pc3ACXKjrhD7OtuTyudY6wr6e QOPHGAlt2JHp5WzFtC3XmQLmaZjE1WKlaGAyEtYKzN2kqtU6kr9wVcpP8JQrhdFrdXuE 0ARrlSh8i+mpg2A9TDNAN1QCgKoWggM50pUW5Z1H9AhxVM0Bo+hWe5PtuBJktiV+FYsu 9otw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si3937132oic.222.2020.03.13.04.10.53; Fri, 13 Mar 2020 04:11:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbgCMLKI (ORCPT + 99 others); Fri, 13 Mar 2020 07:10:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:60604 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbgCMLKH (ORCPT ); Fri, 13 Mar 2020 07:10:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 80966AD32; Fri, 13 Mar 2020 11:10:06 +0000 (UTC) Date: Fri, 13 Mar 2020 12:10:04 +0100 (CET) From: Miroslav Benes To: Josh Poimboeuf cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Andy Lutomirski , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH 01/14] x86/dumpstack: Add SHOW_REGS_IRET mode In-Reply-To: <2b2c601047136a4dbe42ed58715071e5323b5dae.1584033751.git.jpoimboe@redhat.com> Message-ID: References: <2b2c601047136a4dbe42ed58715071e5323b5dae.1584033751.git.jpoimboe@redhat.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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