powerpc/sysfs: Disable writing to PURR in guest mode
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Tue, 1 Oct 2013 19:04:10 +0000 (00:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 17:51:22 +0000 (10:51 -0700)
commit08ccce4afe13b2dcad0ac2a86b7bc138207814ff
tree5e865865d69f862b86425f41e44f0ce187807af9
parentbadd9b71c5651a687d042966a5fa8d195e9cffe4
powerpc/sysfs: Disable writing to PURR in guest mode

commit d1211af3049f4c9c1d8d4eb8f8098cc4f4f0d0c7 upstream.

arch/powerpc/kernel/sysfs.c exports PURR with write permission.
This may be valid for kernel in phyp mode. But writing to
the file in guest mode causes crash due to a priviledge violation

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[Backported to 3.4: adjust context]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/sysfs.c