From: sergey.senozhatsky.work@gmail.com (Sergey Senozhatsky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fix for restoring console loglevel after handling traps
Date: Thu, 19 Jul 2018 19:01:40 +0900 [thread overview]
Message-ID: <20180719100140.GA424@jagdpanzerIV> (raw)
In-Reply-To: <1531993734-1463-2-git-send-email-hari.vyas@broadcom.com>
On (07/19/18 15:18), Hari Vyas wrote:
[..]
Not so sure about the patch, sorry.
> @@ -211,6 +211,8 @@ void die(const char *str, struct pt_regs *regs, int err)
>
> bust_spinlocks(0);
> add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
> +
> + restore_console_loglevel();
> oops_exit();
This is *probably* the only place where you can roll-back the
loglevel, but you restore console loglevel too early - a trap
can panic() the system, we need to preserve the console verbose
mode which we set at the start of the trap.
> @@ -624,6 +626,7 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
> die("Oops - bad mode", regs, 0);
> local_daif_mask();
> panic("bad mode");
> + restore_console_loglevel();
panic()
> @@ -680,6 +683,7 @@ asmlinkage void handle_bad_stack(struct pt_regs *regs)
> * to get a better stack trace.
> */
> nmi_panic(NULL, "kernel stack overflow");
> + restore_console_loglevel();
panic()
> @@ -694,7 +698,7 @@ void __noreturn arm64_serror_panic(struct pt_regs *regs, u32 esr)
> __show_regs(regs);
>
> nmi_panic(regs, "Asynchronous SError Interrupt");
> -
> + restore_console_loglevel();
panic()
What's the point of restore_console_loglevel() after panic()?
-ss
next prev parent reply other threads:[~2018-07-19 10:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 9:48 [PATCH] arm64: fix for restoring console loglevel after handling traps Hari Vyas
2018-07-19 9:48 ` Hari Vyas
2018-07-19 10:01 ` Sergey Senozhatsky [this message]
2018-07-19 10:17 ` Hari Vyas
2018-07-19 10:39 ` Mark Rutland
2018-07-19 14:12 ` Hari Vyas
2018-07-20 6:26 ` Mark Rutland
2018-07-20 6:40 ` Sergey Senozhatsky
2018-07-20 7:31 ` Hari Vyas
2018-07-20 9:44 ` Mark Rutland
2018-07-20 10:57 ` Hari Vyas
2018-07-20 11:22 ` Mark Rutland
2018-07-20 12:13 ` Petr Mladek
2018-07-20 13:34 ` Hari Vyas
2018-07-24 9:14 ` Hari Vyas
2018-07-24 9:48 ` Mark Rutland
2018-07-25 11:13 ` Hari Vyas
2018-07-20 9:28 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180719100140.GA424@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.