Received: by 10.223.185.116 with SMTP id b49csp3375291wrg; Mon, 5 Mar 2018 20:33:16 -0800 (PST) X-Google-Smtp-Source: AG47ELtO4Fbe881wuxpW4zB5Qsz+ntSUMkjvmuEuqfHtuwLTCP3Qw4Fb7+41ImOEhfe3TBAnFD+S X-Received: by 2002:a17:902:550f:: with SMTP id f15-v6mr15268577pli.50.1520310796293; Mon, 05 Mar 2018 20:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520310796; cv=none; d=google.com; s=arc-20160816; b=ihPaoHF7zYGRWCfN7Dx8Zey6EzxMhAAk0xBBhcWO1N6puKn63LK+ZX19Bp9HbnBogI e5lA7EYd1JUjUdSIT9I5Fq6uK/D1TqCEYRdoFNz4YdU43Gp51iTC2/eYTtKqNpmXuqP+ +qHOIMo724FTtGhO/0jnwDwLwaq9v7+Plnw1DFGCfklvqwj6LjXpuBzK366lc2ml3NFT 90jv/mKf8eugs21CLsdhEwPeVswj591e4/5X6MlT+yIJF3mdTB35mvOD2teFQPC3zZ5a 8sACVMyJGgXYF57Ed4bMpM9xuM5nmQj6r9b2BBBBNK7P83i12Btv7ABjIP6sxbieDllr craw== 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:dkim-signature:arc-authentication-results; bh=K3UEivpLkl5uw4WrD/J2mziTfbtucQpF3/NFjKti+1Y=; b=xk+i5Nf2YwCZq48g//gB1rDPVvjcMGK1oZtKjyolK8NSVKXbphFLBU5oVLhc0x+Eic XynxFig37NGFDFwqmR3X6aKsY64rX8M0PopH4MAqmsAE2BjW2+igEN3M7XIVoQE0NKCz 5x1S+3awta9h6d5+5jb6hCwd9Y5EYm8HTreHTKnUT00IH+97pRiaRP9IVqmdW1vY1AMg 8nTnbjc/Cyq8M3bCtMGU4wqzZTMgJ3mLsby5/7JwHnSAiVLfQlXnIR59MUZ9OZWOfub2 wklexAwKSkK/QeyW+e0U46oSNtuso5q4ICMG2IMSJT2lpxlH6CCp3DQy35hJtQ+HKynx IfDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PbxF0I69; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si11172920pfh.230.2018.03.05.20.32.32; Mon, 05 Mar 2018 20:33:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PbxF0I69; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753028AbeCFEaD (ORCPT + 99 others); Mon, 5 Mar 2018 23:30:03 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:33527 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752162AbeCFEaB (ORCPT ); Mon, 5 Mar 2018 23:30:01 -0500 Received: by mail-pl0-f67.google.com with SMTP id c11-v6so11207854plo.0 for ; Mon, 05 Mar 2018 20:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K3UEivpLkl5uw4WrD/J2mziTfbtucQpF3/NFjKti+1Y=; b=PbxF0I69AqU4ccIZrYLeZdaSG1L3/3vQJRLvC/V1SJfPUYBqO/z9VWv3FwsEMG8jPm T3ICczOlKBzuHi4zrlrrZ8dA1l0fV1gunfQ8Tj40G13HCGJVSYTsjLngvffea5V2b7c6 SmUms3ixi9GZB2/M12/GfbNtw30c0679LQYBJauudbpYth/T9wykBT6eHMNyFdevyZOB w+4x+29lFmkuwVDWBh1UXKmECIhllr2vc4MSFD2YvZdUv5FgmL60M7mlpRHVICl6QO9P 1l3TPW5sIElH0uQnffHc07jkkvFs3ucO2h8YzcBGGdicqEdtgoWHOR3El2z0t/PQGewq 4cOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K3UEivpLkl5uw4WrD/J2mziTfbtucQpF3/NFjKti+1Y=; b=CLo5ukbMLcxKFZsAwKahBjMOslRKgae3KrrvdCci6E/s+a66rn7FVkaoYS5LZrDy7/ wF45BY6u27fGWrA+r4vQ3Zvnl3L0xhoTPx9gN/bRNvXvpNNBUZ1Ira2dfYSX1xFcj5PT 3gSLP0z/zOUwX0givmCwP8blmp3UdWHm0ARAGGznWPKZw6WwAqRf7yZDUy66LMkR0SeK k4TRChf1U/EMqq2Y9B0Jt8wrZaooCjMwC6AooPimkrJLgv6mVpjgy+PZaAabdx50oOao UQy/Xyy65t48BLDa00lwWNV5ZR3T6g9VXZzwaRFLq9Dq62hTpGyp27x0pjrg3aow8ct+ YKMg== X-Gm-Message-State: APf1xPBZz9N7FAJ4Zi7KYy77nD8xKQxLizwSIk8oPBuAGGAO+B9ONhEi 1bMtuuUYMI+G84y8mnuDWLw= X-Received: by 2002:a17:902:b691:: with SMTP id c17-v6mr15367978pls.308.1520310601445; Mon, 05 Mar 2018 20:30:01 -0800 (PST) Received: from localhost ([175.223.44.104]) by smtp.gmail.com with ESMTPSA id g13sm24805469pfi.134.2018.03.05.20.29.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 20:30:00 -0800 (PST) Date: Tue, 6 Mar 2018 13:29:57 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , 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: <20180306042957.GE6713@jagdpanzerIV> References: <20180305053742.9149-1-sergey.senozhatsky@gmail.com> <20180305144846.3jommv372c73dltt@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180305144846.3jommv372c73dltt@pathway.suse.cz> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > Anyway, from my side: > > Reviewed-by: Petr Mladek Thanks. -ss