Commit 71839267 authored by Wim Coekaerts's avatar Wim Coekaerts Committed by Paul Mackerras

[PATCH] ppc64: Allow world readable /proc/ppc64/lparcfg

I would like to be able to read the lparcfg data from any user so we
can make "intelligent" decisions based on underlying attributes when
running in lpars.  Yes there's software that likes to do this :) and
runs as non-root.

It's very similar to say VM where you can get CP to provide feedback
of the real hardware inside a VM guest.
Signed-off-by: default avatarWim Coekaerts <wim.coekaerts@oracle.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent fa2259b0
...@@ -569,7 +569,7 @@ struct file_operations lparcfg_fops = { ...@@ -569,7 +569,7 @@ struct file_operations lparcfg_fops = {
int __init lparcfg_init(void) int __init lparcfg_init(void)
{ {
struct proc_dir_entry *ent; struct proc_dir_entry *ent;
mode_t mode = S_IRUSR; mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
/* Allow writing if we have FW_FEATURE_SPLPAR */ /* Allow writing if we have FW_FEATURE_SPLPAR */
if (firmware_has_feature(FW_FEATURE_SPLPAR)) { if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment