linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: Michal Suchanek <msuchanek@suse.com>,
	Ananth Narayan <ananth@in.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	stable@vger.kernel.org,
	Laurent Dufour <ldufour@linux.vnet.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [v7, 3/9] powerpc/pseries: Fix endainness while restoring of r3 in MCE handler.
Date: Mon, 13 Aug 2018 21:23:12 +1000 (AEST)	[thread overview]
Message-ID: <41ptdD5YkCz9sCf@ozlabs.org> (raw)
In-Reply-To: <153365139399.14256.13555279013971561179.stgit@jupiter.in.ibm.com>

On Tue, 2018-08-07 at 14:16:46 UTC, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> 
> During Machine Check interrupt on pseries platform, register r3 points
> RTAS extended event log passed by hypervisor. Since hypervisor uses r3
> to pass pointer to rtas log, it stores the original r3 value at the
> start of the memory (first 8 bytes) pointed by r3. Since hypervisor
> stores this info and rtas log is in BE format, linux should make
> sure to restore r3 value in correct endian format.
> 
> Without this patch when MCE handler, after recovery, returns to code that
> that caused the MCE may end up with Data SLB access interrupt for invalid
> address followed by kernel panic or hang.
> 
> [   62.878965] Severe Machine check interrupt [Recovered]
> [   62.878968]   NIP [d00000000ca301b8]: init_module+0x1b8/0x338 [bork_kernel]
> [   62.878969]   Initiator: CPU
> [   62.878970]   Error type: SLB [Multihit]
> [   62.878971]     Effective address: d00000000ca70000
> cpu 0xa: Vector: 380 (Data SLB Access) at [c0000000fc7775b0]
>     pc: c0000000009694c0: vsnprintf+0x80/0x480
>     lr: c0000000009698e0: vscnprintf+0x20/0x60
>     sp: c0000000fc777830
>    msr: 8000000002009033
>    dar: a803a30c000000d0
>   current = 0xc00000000bc9ef00
>   paca    = 0xc00000001eca5c00	 softe: 3	 irq_happened: 0x01
>     pid   = 8860, comm = insmod
> [c0000000fc7778b0] c0000000009698e0 vscnprintf+0x20/0x60
> [c0000000fc7778e0] c00000000016b6c4 vprintk_emit+0xb4/0x4b0
> [c0000000fc777960] c00000000016d40c vprintk_func+0x5c/0xd0
> [c0000000fc777980] c00000000016cbb4 printk+0x38/0x4c
> [c0000000fc7779a0] d00000000ca301c0 init_module+0x1c0/0x338 [bork_kernel]
> [c0000000fc777a40] c00000000000d9c4 do_one_initcall+0x54/0x230
> [c0000000fc777b00] c0000000001b3b74 do_init_module+0x8c/0x248
> [c0000000fc777b90] c0000000001b2478 load_module+0x12b8/0x15b0
> [c0000000fc777d30] c0000000001b29e8 sys_finit_module+0xa8/0x110
> [c0000000fc777e30] c00000000000b204 system_call+0x58/0x6c
> --- Exception: c00 (System Call) at 00007fff8bda0644
> SP (7fffdfbfe980) is in userspace
> 
> This patch fixes this issue.
> 
> Fixes: a08a53ea4c97 ("powerpc/le: Enable RTAS events support")
> Cc: stable@vger.kernel.org
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/cd813e1cd7122f2c261dce5b54d1e0

cheers

  reply	other threads:[~2018-08-13 11:23 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 14:15 [PATCH v7 0/9] powerpc/pseries: Machine check handler improvements Mahesh J Salgaonkar
2018-08-07 14:16 ` [PATCH v7 1/9] powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX Mahesh J Salgaonkar
2018-08-07 14:16 ` [PATCH v7 2/9] powerpc/pseries: Defer the logging of rtas error to irq work queue Mahesh J Salgaonkar
2018-08-07 14:16 ` [PATCH v7 3/9] powerpc/pseries: Fix endainness while restoring of r3 in MCE handler Mahesh J Salgaonkar
2018-08-13 11:23   ` Michael Ellerman [this message]
2018-08-07 14:16 ` [PATCH v7 4/9] powerpc/pseries: Define MCE error event section Mahesh J Salgaonkar
2018-08-08 14:42   ` Michael Ellerman
2018-08-10 10:29     ` Mahesh Jagannath Salgaonkar
2018-08-16  4:14       ` Michael Ellerman
2018-08-16 14:44         ` Segher Boessenkool
2018-08-17 11:22         ` Mahesh Jagannath Salgaonkar
2018-08-07 14:17 ` [PATCH v7 5/9] powerpc/pseries: flush SLB contents on SLB MCE errors Mahesh J Salgaonkar
2018-08-07 16:54   ` Michal Suchánek
2018-08-10 10:30     ` Mahesh Jagannath Salgaonkar
2018-08-08  9:04   ` Nicholas Piggin
2018-08-10 10:30     ` Mahesh Jagannath Salgaonkar
2018-08-07 14:17 ` [PATCH v7 6/9] powerpc/pseries: Display machine check error details Mahesh J Salgaonkar
2018-08-07 14:17 ` [PATCH v7 7/9] powerpc/pseries: Dump the SLB contents on SLB MCE errors Mahesh J Salgaonkar
2018-08-09  1:05   ` Michael Ellerman
2018-08-10 10:32     ` Mahesh Jagannath Salgaonkar
2018-08-10 10:49       ` Mahesh Jagannath Salgaonkar
2018-08-11  4:33   ` Nicholas Piggin
2018-08-13  4:17     ` Mahesh Jagannath Salgaonkar
2018-08-13 14:27       ` Nicholas Piggin
2018-08-14 10:57         ` Mahesh Jagannath Salgaonkar
2018-08-14 12:47           ` Aneesh Kumar K.V
2018-08-07 14:17 ` [PATCH v7 8/9] powerpc/mce: Add sysctl control for recovery action on MCE Mahesh J Salgaonkar
2018-08-08 14:56   ` Michael Ellerman
2018-08-08 15:37     ` Aneesh Kumar K.V
2018-08-08 16:09       ` Michal Suchánek
2018-08-10 11:04         ` Michael Ellerman
2018-08-09  6:34       ` Michael Ellerman
2018-08-09  8:02         ` Nicholas Piggin
2018-08-09  8:09           ` Ananth N Mavinakayanahalli
2018-08-09  8:33             ` Nicholas Piggin
2018-08-09 10:26               ` Michal Suchánek
2018-08-10  7:31                 ` Nicholas Piggin
2018-08-09  1:43     ` Nicholas Piggin
2018-08-07 14:18 ` [PATCH v7 9/9] powernv/pseries: consolidate code for mce early handling Mahesh J Salgaonkar

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=41ptdD5YkCz9sCf@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=ananth@in.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=msuchanek@suse.com \
    --cc=npiggin@gmail.com \
    --cc=stable@vger.kernel.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 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).