]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm64: Ignore the 'write' ESR flag on cache maintenance faults
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 7 May 2013 15:57:06 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2013 20:53:59 +0000 (13:53 -0700)
commita0ca61ff1b18a11e7e7d085aa282a5593fb25126
tree8ea7a2cdc766f70f6060d63e1fe8be08c77352e3
parent1d3a7eb266a154bbb90da4c7a9b992c4a3d75c22
arm64: Ignore the 'write' ESR flag on cache maintenance faults

commit 0e7f7bcc3fc87489cda5aa6aff8ce40eed912279 upstream.

ESR.WnR bit is always set on data cache maintenance faults even though
the page is not required to have write permission. If a translation
fault (page not yet mapped) happens for read-only user address range,
Linux incorrectly assumes a permission fault. This patch adds the check
of the ESR.CM bit during the page fault handling to ignore the 'write'
flag.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Tim Northover <Tim.Northover@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/fault.c