summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2019-02-27 14:02:29 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 20:11:31 +0100
commit16ee62368aaa56bc52793b563f93bf3ba7410c22 (patch)
tree8bb446c171a29873194cc8d500f5c2dced3f09f5
parent8d2cc8c1c4fec1c33376fd2ae01ac393720723ec (diff)
downloadblackbird-obmc-linux-16ee62368aaa56bc52793b563f93bf3ba7410c22.tar.gz
blackbird-obmc-linux-16ee62368aaa56bc52793b563f93bf3ba7410c22.zip
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") Cc: stable@vger.kernel.org # v3.15+ 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 acd3206dfae3..06628c71cef6 100644
--- a/arch/powerpc/platforms/powernv/opal-msglog.c
+++ b/arch/powerpc/platforms/powernv/opal-msglog.c
@@ -98,7 +98,7 @@ static ssize_t opal_msglog_read(struct file *file, struct kobject *kobj,
}
static struct bin_attribute opal_msglog_attr = {
- .attr = {.name = "msglog", .mode = 0444},
+ .attr = {.name = "msglog", .mode = 0400},
.read = opal_msglog_read
};
OpenPOWER on IntegriCloud