diff mbox series

[v3,09/40] cxl/decoder: Hide physical address information from non-root

Message ID 164298416650.3018233.450720006145238709.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Not Applicable
Delegated to: Bjorn Helgaas
Headers show
Series CXL.mem Topology Discovery and Hotplug Support | expand

Commit Message

Dan Williams Jan. 24, 2022, 12:29 a.m. UTC
Just like /proc/iomem, CXL physical address information is reserved for
root only.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/cxl/core/port.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron Jan. 31, 2022, 2:14 p.m. UTC | #1
On Sun, 23 Jan 2022 16:29:26 -0800
Dan Williams <dan.j.williams@intel.com> wrote:

> Just like /proc/iomem, CXL physical address information is reserved for
> root only.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Seems sensible.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/cxl/core/port.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index 3f9b98ecd18b..c5e74c6f04e8 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -49,7 +49,7 @@ static ssize_t start_show(struct device *dev, struct device_attribute *attr,
>  
>  	return sysfs_emit(buf, "%#llx\n", cxld->range.start);
>  }
> -static DEVICE_ATTR_RO(start);
> +static DEVICE_ATTR_ADMIN_RO(start);
>  
>  static ssize_t size_show(struct device *dev, struct device_attribute *attr,
>  			char *buf)
>
Ben Widawsky Jan. 31, 2022, 10:34 p.m. UTC | #2
On 22-01-23 16:29:26, Dan Williams wrote:
> Just like /proc/iomem, CXL physical address information is reserved for
> root only.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>

[snip]
diff mbox series

Patch

diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 3f9b98ecd18b..c5e74c6f04e8 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -49,7 +49,7 @@  static ssize_t start_show(struct device *dev, struct device_attribute *attr,
 
 	return sysfs_emit(buf, "%#llx\n", cxld->range.start);
 }
-static DEVICE_ATTR_RO(start);
+static DEVICE_ATTR_ADMIN_RO(start);
 
 static ssize_t size_show(struct device *dev, struct device_attribute *attr,
 			char *buf)