All of lore.kernel.org
 help / color / mirror / Atom feed
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: Fri, 20 Jul 2018 15:40:27 +0900	[thread overview]
Message-ID: <20180720064027.GA3901@jagdpanzerIV> (raw)
In-Reply-To: <20180720062609.2haxhf23zyouoxmh@salmiak>

On (07/20/18 07:26), Mark Rutland wrote:
> > >
> > This die() is called from so many places i.e. entry.S shows so many ways i.e
> > el1_sync_invalid,irq,fiq_invalid,error_invalid.

[..]

> Indeed, but *none* of these should fire unless something has gone wrong already.

[..]

Agreed.

I see that all those arm64/kernel/entry.S el0_sync_invalid,
el0_irq_invalid, el0_fiq_invalid, and so on, invoke inv_entry macro
which calls into bad_mode, which ends up in panic() anyway:

asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
{
	console_verbose();

	pr_crit("Bad mode in %s handler detected on CPU%d, code 0x%08x -- %s\n",
		handler[reason], smp_processor_id(), esr,
		esr_get_class_string(esr));

	die("Oops - bad mode", regs, 0);
	local_daif_mask();
	panic("bad mode");
}

bad_mode is always fatal.

When the kernel becomes suicidal and wants to die() we better have
verbose consoles. So, no, I don't think I'm buying the patch.

	-ss

  reply	other threads:[~2018-07-20  6:40 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
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 [this message]
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=20180720064027.GA3901@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.