Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1624631
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel Axtens <dja@axtens.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] powerpc/book3s: mce: Use add_taint_no_warn() in machine_check_early(). |
| Date | Mon, 17 Apr 2017 12:40:01 +0200 |
| Message-ID | <txceB-7ZQ-11@gated-at.bofh.it> (permalink) |
| References | <tdafn-5RX-1@gated-at.bofh.it> <tdafn-5RX-3@gated-at.bofh.it> |
| X-Original-To | Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>, linuxppc-dev <linuxppc-dev@ozlabs.org>, Linux Kernel <linux-kernel@vger.kernel.org>, Michael Ellerman <mpe@ellerman.id.au> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=sxa2A4e/LmwzakXZZ/1VClMuM0Pt4IUOwNboTQBAm+A=; b=n3tJ3MW/4nK3AEsNuH1hAHQMMWe75/z+NFiPR3OeuAHxXcieqtRldC4qmmVeD+WVZR d0VuEMbvK8Wk1IBzS8WBgsPyR624G4hlx1kpPvbbeC5w++MCOV+D1wh8l8eLCH3GUy75 2tN9NGmTpA+uEe4i7rlT9zLA2/SQA0IeB58ec= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=sxa2A4e/LmwzakXZZ/1VClMuM0Pt4IUOwNboTQBAm+A=; b=spmXuq5eAo4muMc2gp7oSvFuwyKGL2gq9Ow7Bp7MZWiufGjZy752tFxhyGUHU3vi1D oASEWGndwfMxExW9fN+ELpjY8r5ph5XzrAdfSE/StUuWllGnE7ZE5+O7KhF6cNaQlR2Q IEfJFsyWXZvSBwvlaPmpD7viQiD9rYvzDELv5j5GL9iqy++8l5bwMTuenkjRd78LeAfz RouazbfeBJ135XV3sDM1ASLZaH0I1KJUYEGBdMKa102YbLJeE4r9yX+/xTyDvigJu4RV wST+9AkDU8ArznhKDsrDoNpd263sCgxoBtEyFEocbChfb0GaC3X+NT78n1qAMEm7G3gZ 0ZgQ== |
| X-Gm-Message-State | AN3rC/5vOcOYnEddjXoavJWEDHo4bo/v/AIoJHw1rfTZdaBceytKnf1E JefAT1SNPjRwHg== |
| X-Received | by 10.99.122.12 with SMTP id v12mr11528337pgc.98.1492425593141; Mon, 17 Apr 2017 03:39:53 -0700 (PDT) |
| User-Agent | Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 58 |
| Organization | linux.* mail to news gateway |
| X-Original-Date | Mon, 17 Apr 2017 20:39:48 +1000 |
| X-Original-Message-ID | <87o9vvuxl7.fsf@possimpible.ozlabs.ibm.com> |
| X-Original-References | <148765088309.20315.15300624012053746538.stgit@jupiter.in.ibm.com> <148765089349.20315.11180051017586952500.stgit@jupiter.in.ibm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1624631 |
Show key headers only | View raw
Hi Mahesh, > Fixes: 27ea2c420cad powerpc: Set the correct kernel taint on machine check errors. I notice this Fixes a commit I introduced. Please could you cc me when you do this? I am likely to miss it otherwise, especially since I have now left IBM. Being cced allows me to provide an Ack or a review. And getting feedback on my changes is very helpful in becoming a better programmer. In this case, as per Michael's comment, why don't we just move the add_taint from machine_check_early to machine_check_process_queued_event - the other side of the work queue. The work queue system is supposed to provide us with a safe place to do printing, etc., so it's an appropriate place. Also, we already do machine_check_print_event_info there, and adding the taint doesn't need to be done synchronously. Regards, Daniel Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> writes: > From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> > > machine_check_early() gets called in real mode. The very first time when > add_taint() is called, it prints a warning which ends up calling opal > call (that uses OPAL_CALL wrapper) for writing it to console. If we get a > very first machine check while we are in opal we are doomed. OPAL_CALL > overwrites the PACASAVEDMSR in r13 and in this case when we are done with > MCE handling the original opal call will use this new MSR on it's way > back to opal_return. This usually leads unexpected behaviour or kernel > to panic. Instead use the add_taint_no_warn() that does not call printk. > > This is broken with current FW level. We got lucky so far for not getting > very first MCE hit while in OPAL. But easily reproducible on Mambo. > This should go to stable as well alongwith patch 1/2. > > Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> > --- > arch/powerpc/kernel/traps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c > index 62b587f..4a048dc 100644 > --- a/arch/powerpc/kernel/traps.c > +++ b/arch/powerpc/kernel/traps.c > @@ -306,7 +306,7 @@ long machine_check_early(struct pt_regs *regs) > > __this_cpu_inc(irq_stat.mce_exceptions); > > - add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE); > + add_taint_no_warn(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE); > > /* > * See if platform is capable of handling machine check. (e.g. PowerNV
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 2/2] powerpc/book3s: mce: Use add_taint_no_warn() in machine_check_early(). Daniel Axtens <dja@axtens.net> - 2017-04-17 12:40 +0200 Re: [PATCH 2/2] powerpc/book3s: mce: Use add_taint_no_warn() in machine_check_early(). Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> - 2017-04-17 13:20 +0200
csiph-web