* [PATCH] powerpc: Set the correct kernel taint on machine check errors.
@ 2015-06-15 3:25 Daniel Axtens
2015-06-24 5:00 ` Michael Ellerman
2015-07-07 10:38 ` Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Axtens @ 2015-06-15 3:25 UTC (permalink / raw)
To: linuxppc-dev; +Cc: mpe, benh, Daniel Axtens
This means the 'M' flag will work properly when the kernel prints a backtrace.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 6530f1b..37de90f 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -297,6 +297,8 @@ long machine_check_early(struct pt_regs *regs)
__this_cpu_inc(irq_stat.mce_exceptions);
+ add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
+
if (cur_cpu_spec && cur_cpu_spec->machine_check_early)
handled = cur_cpu_spec->machine_check_early(regs);
return handled;
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Set the correct kernel taint on machine check errors.
2015-06-15 3:25 [PATCH] powerpc: Set the correct kernel taint on machine check errors Daniel Axtens
@ 2015-06-24 5:00 ` Michael Ellerman
2015-06-24 5:08 ` Daniel Axtens
2015-07-07 10:38 ` Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2015-06-24 5:00 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, benh
On Mon, 2015-06-15 at 13:25 +1000, Daniel Axtens wrote:
> This means the 'M' flag will work properly when the kernel prints a backtrace.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
> arch/powerpc/kernel/traps.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index 6530f1b..37de90f 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -297,6 +297,8 @@ long machine_check_early(struct pt_regs *regs)
>
> __this_cpu_inc(irq_stat.mce_exceptions);
>
> + add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
I'm not sure about the lockdep bit.
I guess it's safer to just declare it fubar.
Does this fix a bug, or just nice to have?
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Set the correct kernel taint on machine check errors.
2015-06-24 5:00 ` Michael Ellerman
@ 2015-06-24 5:08 ` Daniel Axtens
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Axtens @ 2015-06-24 5:08 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, benh
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
On Wed, 2015-06-24 at 15:00 +1000, Michael Ellerman wrote:
> On Mon, 2015-06-15 at 13:25 +1000, Daniel Axtens wrote:
> > This means the 'M' flag will work properly when the kernel prints a backtrace.
> >
> > Signed-off-by: Daniel Axtens <dja@axtens.net>
> > ---
> > arch/powerpc/kernel/traps.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> > index 6530f1b..37de90f 100644
> > --- a/arch/powerpc/kernel/traps.c
> > +++ b/arch/powerpc/kernel/traps.c
> > @@ -297,6 +297,8 @@ long machine_check_early(struct pt_regs *regs)
> >
> > __this_cpu_inc(irq_stat.mce_exceptions);
> >
> > + add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
>
> I'm not sure about the lockdep bit.
>
> I guess it's safer to just declare it fubar.
>
I'm also not sure; I was matching x86 behaviour.
> Does this fix a bug, or just nice to have?
>
If you consider having the taint bits set incorrectly to be a bug, then
it fixes a bug. Otherwise, it's just nice debug info to have: when we
get a traceback with M set that isn't obviously related to a MCE we are
forewarned.
> cheers
>
>
--
Regards,
Daniel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 860 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc: Set the correct kernel taint on machine check errors.
2015-06-15 3:25 [PATCH] powerpc: Set the correct kernel taint on machine check errors Daniel Axtens
2015-06-24 5:00 ` Michael Ellerman
@ 2015-07-07 10:38 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2015-07-07 10:38 UTC (permalink / raw)
To: Daniel Axtens, linuxppc-dev; +Cc: Daniel Axtens
On Mon, 2015-15-06 at 03:25:19 UTC, Daniel Axtens wrote:
> This means the 'M' flag will work properly when the kernel prints a backtrace.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Applied to powerpc fixes, thanks.
https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?h=fixes&id=27ea2c420cad57386c25668cb9a9f0f082635586
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-07 10:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-15 3:25 [PATCH] powerpc: Set the correct kernel taint on machine check errors Daniel Axtens
2015-06-24 5:00 ` Michael Ellerman
2015-06-24 5:08 ` Daniel Axtens
2015-07-07 10:38 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).