Received: by 10.223.185.116 with SMTP id b49csp3765737wrg; Tue, 6 Mar 2018 04:44:43 -0800 (PST) X-Google-Smtp-Source: AG47ELsrykls+FHhV6FG9Dv5k96siif6PuXVbKShIT3N/Ob3U4X5eCzY1s3+Cew3+zIi78ITPUSL X-Received: by 2002:a17:902:82c6:: with SMTP id u6-v6mr16734931plz.401.1520340283457; Tue, 06 Mar 2018 04:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520340283; cv=none; d=google.com; s=arc-20160816; b=eNxrcioJ4eU+jDzT4gUsKR+3rsRrJLkaPsREl96Q4f6/4suMkwDwK0BeTu7E3a2L0S pppU0w0UKAeVBDC0btXqly0UHX9FWDprBIUXng+u4Bch4mnGv1++36vONljh/uSaJN9+ Vn3maHo/y6t3/38qqnEtUDn25N5JAQDqdo5y7jgXsxyF46iR08AInutIjja6wqsKLwlw oOwWHxW2i5BTnikRR9NmPijQz+ioJl2J5E5kfgXkIw9ApC6RJjH/uzJPHfSTfYg66XYk nmQXmG6nElz5PeiE0pSTwQQZvozDNscrg17xrPYP61Khc0ZZRXm2JUzCrg3pjm9tNpi6 dm4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Z+YItJFxBTCyx+8oo8hEgwhtsoxY6XiQWGMWXGmsusA=; b=vm3ljCUI8/HYHaUbMlsbt0Zl1ZSm5k79Nu0OKVhTIFapYpS0Dtxe1ucJzpv9LQB3BC RrrDx4E2XDtt1njdUN9NgBshkPdCc6eY3FghxcUvGIqdhiktCvpNWtFEF2Gnbngjl7Be 9KdJMqjZHT3UtK0YCkBjcV4lTT3R2c61pfL3gp0a/daO9gwTIl4lZHsEDaDjo2qaW3fG nEcd93454wDzNsdyELhdNcNlP+RULXE6BD6YDGCPIGsfugcL9OxLVLSCEH3liWqW482A fc2RsDfkm4Gjj2Roo3KrQ4utnuS6sa9W3W/WTc0N7UNmuN9o1sNfSPaR/gYJph4or+SE EHAg== 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 f3-v6si11120176plb.717.2018.03.06.04.44.28; Tue, 06 Mar 2018 04:44:43 -0800 (PST) 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 S1753582AbeCFMnb (ORCPT + 99 others); Tue, 6 Mar 2018 07:43:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:42320 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbeCFMna (ORCPT ); Tue, 6 Mar 2018 07:43:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E8E2FAF9C; Tue, 6 Mar 2018 12:43:27 +0000 (UTC) Date: Tue, 6 Mar 2018 13:43:26 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Tejun Heo , Steven Rostedt , Dave Young , Andi Kleen , Greentime Hu , Vincent Chen , Arnd Bergmann , Peter Zijlstra , Andrew Morton , Stephen Rothwell , adi-buildroot-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol Message-ID: <20180306124326.ucom526x6giwp2br@pathway.suse.cz> References: <20180305053742.9149-1-sergey.senozhatsky@gmail.com> <20180305144846.3jommv372c73dltt@pathway.suse.cz> <20180306042957.GE6713@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180306042957.GE6713@jagdpanzerIV> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2018-03-06 13:29:57, Sergey Senozhatsky wrote: > On (03/05/18 15:48), Petr Mladek wrote: > [..] > > > > I hope that I did not miss anything. I could not try this at > > runtime. > > I think you can. The rules are universal, you can do on x86 > something like this > > --- > > arch/x86/kernel/dumpstack.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > index a2d8a3908670..5d45f406717e 100644 > --- a/arch/x86/kernel/dumpstack.c > +++ b/arch/x86/kernel/dumpstack.c > @@ -375,3 +375,16 @@ static int __init code_bytes_setup(char *s) > return 1; > } > __setup("code_bytes=", code_bytes_setup); > + > +void dump_stack(void) > +{ > + dump_stack_print_info(KERN_DEFAULT); > + > + pr_crit("\t\tLinux\n\n"); > + > + pr_crit("An error has occurred. To continue:\n" > + "Press Enter to return to Linux, or\n" > + "Press CTRL+ALT+DEL to restart your computer.\n"); > + > + pr_crit("\n\n\tPress any key to continue _"); > +} > > --- > > Should be enough for testing. Yup, this worked. I have pushed the patch into printk.git for-4.17 branch, see https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/commit/?h=for-4.17&id=33251b634b4aa1317e2f911e3b723179949a0605 Greentime Hu, the for-4.17 branch in printk.git is based on Linus' tree. Therefore I had to remove the hunk against arch/nds32/kernel/traps.c because this file is only in linux-next. I think that it might be easier if you remove the EXPORT_SYMBOL() in your branch. Is it OK for you, please? Best Regards, Petr