]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
powerpc: Fix DAR reporting when alignment handler faults
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Aug 2017 10:49:57 +0000 (20:49 +1000)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 14:34:54 +0000 (10:34 -0400)
commite1bdea22ca0f0524c7b64c16c4b530fc50bdec9f
tree8d527be8e63ec1d91d1ba968e2dc8e65acc5e6bc
parente6a9815bb680783ca3061d5aa08e815227a798cf
powerpc: Fix DAR reporting when alignment handler faults

BugLink: http://bugs.launchpad.net/bugs/1720154
commit f9effe925039cf54489b5c04e0d40073bb3a123d upstream.

Anton noticed that if we fault part way through emulating an unaligned
instruction, we don't update the DAR to reflect that.

The DAR value is eventually reported back to userspace as the address
in the SEGV signal, and if userspace is using that value to demand
fault then it can be confused by us not setting the value correctly.

This patch is ugly as hell, but is intended to be the minimal fix and
back ports easily.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/kernel/align.c