summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2019-02-27 06:02:29 +0300
committerBen Hutchings <ben@decadent.org.uk>2019-07-10 00:04:08 +0300
commit195f8ed183f67316fa98869451b0fd59987cba8d (patch)
treefd253af281c6922bca9116e4e966a05955a7e2a6
parenteb594e29f56c28fd2ea513d18013524a7d34e5df (diff)
downloadlinux-195f8ed183f67316fa98869451b0fd59987cba8d.tar.xz
powerpc/powernv: Make opal log only readable by root
commit 7b62f9bd2246b7d3d086e571397c14ba52645ef1 upstream. Currently the opal log is globally readable. It is kernel policy to limit the visibility of physical addresses / kernel pointers to root. Given this and the fact the opal log may contain this information it would be better to limit the readability to root. Fixes: bfc36894a48b ("powerpc/powernv: Add OPAL message log interface") Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Stewart Smith <stewart@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/powerpc/platforms/powernv/opal-msglog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-msglog.c b/arch/powerpc/platforms/powernv/opal-msglog.c
index 44ed78af1a0d..9021b7272889 100644
--- a/arch/powerpc/platforms/powernv/opal-msglog.c
+++ b/arch/powerpc/platforms/powernv/opal-msglog.c
@@ -92,7 +92,7 @@ out:
}
static struct bin_attribute opal_msglog_attr = {
- .attr = {.name = "msglog", .mode = 0444},
+ .attr = {.name = "msglog", .mode = 0400},
.read = opal_msglog_read
};