All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions
@ 2021-05-04 17:00 Wolfram Sang
  2021-05-04 17:00 ` [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
  2021-05-04 17:35 ` [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Wolfram Sang @ 2021-05-04 17:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Andy Shevchenko, Corentin Chary, Hans de Goede,
	Mark Gross, platform-driver-x86

Andy asked me to do it before working further on the code.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Change since v1: new patch

 drivers/platform/x86/samsung-laptop.c | 35 +++++++++++----------------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index d5cec6e35bb8..763d97cbbe53 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -388,7 +388,7 @@ MODULE_PARM_DESC(force,
 		"Disable the DMI check and forces the driver to be loaded");
 
 static bool debug;
-module_param(debug, bool, S_IRUGO | S_IWUSR);
+module_param(debug, bool, 0644);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
 
 static int sabi_command(struct samsung_laptop *samsung, u16 command,
@@ -705,7 +705,7 @@ static ssize_t set_performance_level(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO,
+static DEVICE_ATTR(performance_level, 0644,
 		   get_performance_level, set_performance_level);
 
 static int read_battery_life_extender(struct samsung_laptop *samsung)
@@ -774,7 +774,7 @@ static ssize_t set_battery_life_extender(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(battery_life_extender, S_IWUSR | S_IRUGO,
+static DEVICE_ATTR(battery_life_extender, 0644,
 		   get_battery_life_extender, set_battery_life_extender);
 
 static int read_usb_charge(struct samsung_laptop *samsung)
@@ -843,7 +843,7 @@ static ssize_t set_usb_charge(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(usb_charge, S_IWUSR | S_IRUGO,
+static DEVICE_ATTR(usb_charge, 0644,
 		   get_usb_charge, set_usb_charge);
 
 static int read_lid_handling(struct samsung_laptop *samsung)
@@ -908,7 +908,7 @@ static ssize_t set_lid_handling(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(lid_handling, S_IWUSR | S_IRUGO,
+static DEVICE_ATTR(lid_handling, 0644,
 		   get_lid_handling, set_lid_handling);
 
 static struct attribute *platform_attributes[] = {
@@ -1291,24 +1291,17 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
 	samsung->debug.sdiag_wrapper.data = samsung->sdiag;
 	samsung->debug.sdiag_wrapper.size = strlen(samsung->sdiag);
 
-	debugfs_create_u16("command", S_IRUGO | S_IWUSR, root,
-			   &samsung->debug.command);
-	debugfs_create_u32("d0", S_IRUGO | S_IWUSR, root,
-			   &samsung->debug.data.d0);
-	debugfs_create_u32("d1", S_IRUGO | S_IWUSR, root,
-			   &samsung->debug.data.d1);
-	debugfs_create_u16("d2", S_IRUGO | S_IWUSR, root,
-			   &samsung->debug.data.d2);
-	debugfs_create_u8("d3", S_IRUGO | S_IWUSR, root,
-			  &samsung->debug.data.d3);
-	debugfs_create_blob("data", S_IRUGO | S_IWUSR, root,
-			    &samsung->debug.data_wrapper);
-	debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, root,
+	debugfs_create_u16("command", 0644, root, &samsung->debug.command);
+	debugfs_create_u32("d0", 0644, root, &samsung->debug.data.d0);
+	debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1);
+	debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2);
+	debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3);
+	debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper);
+	debugfs_create_blob("f0000_segment", 0600, root,
 			    &samsung->debug.f0000_wrapper);
-	debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
+	debugfs_create_file("call", S_IFREG | 0444, root, samsung,
 			    &samsung_laptop_call_fops);
-	debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, root,
-			    &samsung->debug.sdiag_wrapper);
+	debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper);
 }
 
 static void samsung_sabi_exit(struct samsung_laptop *samsung)
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 17:00 [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Wolfram Sang
@ 2021-05-04 17:00 ` Wolfram Sang
  2021-05-04 17:38   ` Andy Shevchenko
  2021-05-04 17:35 ` [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2021-05-04 17:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Corentin Chary, Hans de Goede, Mark Gross,
	platform-driver-x86

Those blobs can only be read. So, don't confuse users with 'writable'
flags.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Change since v1: use octal numbers

 drivers/platform/x86/samsung-laptop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 763d97cbbe53..9aa0de8b7581 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -1296,12 +1296,12 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
 	debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1);
 	debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2);
 	debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3);
-	debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper);
-	debugfs_create_blob("f0000_segment", 0600, root,
+	debugfs_create_blob("data", 0444, root, &samsung->debug.data_wrapper);
+	debugfs_create_blob("f0000_segment", 0400, root,
 			    &samsung->debug.f0000_wrapper);
 	debugfs_create_file("call", S_IFREG | 0444, root, samsung,
 			    &samsung_laptop_call_fops);
-	debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper);
+	debugfs_create_blob("sdiag", 0444, root, &samsung->debug.sdiag_wrapper);
 }
 
 static void samsung_sabi_exit(struct samsung_laptop *samsung)
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions
  2021-05-04 17:00 [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Wolfram Sang
  2021-05-04 17:00 ` [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
@ 2021-05-04 17:35 ` Andy Shevchenko
  2021-05-04 17:37   ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2021-05-04 17:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 8:00 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Andy asked me to do it before working further on the code.

Thanks!
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Change since v1: new patch
>
>  drivers/platform/x86/samsung-laptop.c | 35 +++++++++++----------------
>  1 file changed, 14 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
> index d5cec6e35bb8..763d97cbbe53 100644
> --- a/drivers/platform/x86/samsung-laptop.c
> +++ b/drivers/platform/x86/samsung-laptop.c
> @@ -388,7 +388,7 @@ MODULE_PARM_DESC(force,
>                 "Disable the DMI check and forces the driver to be loaded");
>
>  static bool debug;
> -module_param(debug, bool, S_IRUGO | S_IWUSR);
> +module_param(debug, bool, 0644);
>  MODULE_PARM_DESC(debug, "Debug enabled or not");
>
>  static int sabi_command(struct samsung_laptop *samsung, u16 command,
> @@ -705,7 +705,7 @@ static ssize_t set_performance_level(struct device *dev,
>         return count;
>  }
>
> -static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO,
> +static DEVICE_ATTR(performance_level, 0644,
>                    get_performance_level, set_performance_level);
>
>  static int read_battery_life_extender(struct samsung_laptop *samsung)
> @@ -774,7 +774,7 @@ static ssize_t set_battery_life_extender(struct device *dev,
>         return count;
>  }
>
> -static DEVICE_ATTR(battery_life_extender, S_IWUSR | S_IRUGO,
> +static DEVICE_ATTR(battery_life_extender, 0644,
>                    get_battery_life_extender, set_battery_life_extender);
>
>  static int read_usb_charge(struct samsung_laptop *samsung)
> @@ -843,7 +843,7 @@ static ssize_t set_usb_charge(struct device *dev,
>         return count;
>  }
>
> -static DEVICE_ATTR(usb_charge, S_IWUSR | S_IRUGO,
> +static DEVICE_ATTR(usb_charge, 0644,
>                    get_usb_charge, set_usb_charge);
>
>  static int read_lid_handling(struct samsung_laptop *samsung)
> @@ -908,7 +908,7 @@ static ssize_t set_lid_handling(struct device *dev,
>         return count;
>  }
>
> -static DEVICE_ATTR(lid_handling, S_IWUSR | S_IRUGO,
> +static DEVICE_ATTR(lid_handling, 0644,
>                    get_lid_handling, set_lid_handling);
>
>  static struct attribute *platform_attributes[] = {
> @@ -1291,24 +1291,17 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
>         samsung->debug.sdiag_wrapper.data = samsung->sdiag;
>         samsung->debug.sdiag_wrapper.size = strlen(samsung->sdiag);
>
> -       debugfs_create_u16("command", S_IRUGO | S_IWUSR, root,
> -                          &samsung->debug.command);
> -       debugfs_create_u32("d0", S_IRUGO | S_IWUSR, root,
> -                          &samsung->debug.data.d0);
> -       debugfs_create_u32("d1", S_IRUGO | S_IWUSR, root,
> -                          &samsung->debug.data.d1);
> -       debugfs_create_u16("d2", S_IRUGO | S_IWUSR, root,
> -                          &samsung->debug.data.d2);
> -       debugfs_create_u8("d3", S_IRUGO | S_IWUSR, root,
> -                         &samsung->debug.data.d3);
> -       debugfs_create_blob("data", S_IRUGO | S_IWUSR, root,
> -                           &samsung->debug.data_wrapper);
> -       debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, root,
> +       debugfs_create_u16("command", 0644, root, &samsung->debug.command);
> +       debugfs_create_u32("d0", 0644, root, &samsung->debug.data.d0);
> +       debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1);
> +       debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2);
> +       debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3);
> +       debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper);
> +       debugfs_create_blob("f0000_segment", 0600, root,
>                             &samsung->debug.f0000_wrapper);
> -       debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
> +       debugfs_create_file("call", S_IFREG | 0444, root, samsung,
>                             &samsung_laptop_call_fops);
> -       debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, root,
> -                           &samsung->debug.sdiag_wrapper);
> +       debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper);
>  }
>
>  static void samsung_sabi_exit(struct samsung_laptop *samsung)
> --
> 2.30.0
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions
  2021-05-04 17:35 ` [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Andy Shevchenko
@ 2021-05-04 17:37   ` Andy Shevchenko
  2021-05-17 10:02     ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2021-05-04 17:37 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 8:35 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, May 4, 2021 at 8:00 PM Wolfram Sang
> <wsa+renesas@sang-engineering.com> wrote:
> >
> > Andy asked me to do it before working further on the code.
>
> Thanks!
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> > Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >
> > Change since v1: new patch
> >
> >  drivers/platform/x86/samsung-laptop.c | 35 +++++++++++----------------
> >  1 file changed, 14 insertions(+), 21 deletions(-)
> >
> > diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
> > index d5cec6e35bb8..763d97cbbe53 100644
> > --- a/drivers/platform/x86/samsung-laptop.c
> > +++ b/drivers/platform/x86/samsung-laptop.c
> > @@ -388,7 +388,7 @@ MODULE_PARM_DESC(force,
> >                 "Disable the DMI check and forces the driver to be loaded");
> >
> >  static bool debug;
> > -module_param(debug, bool, S_IRUGO | S_IWUSR);
> > +module_param(debug, bool, 0644);
> >  MODULE_PARM_DESC(debug, "Debug enabled or not");
> >
> >  static int sabi_command(struct samsung_laptop *samsung, u16 command,
> > @@ -705,7 +705,7 @@ static ssize_t set_performance_level(struct device *dev,
> >         return count;
> >  }
> >
> > -static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO,
> > +static DEVICE_ATTR(performance_level, 0644,
> >                    get_performance_level, set_performance_level);
> >
> >  static int read_battery_life_extender(struct samsung_laptop *samsung)
> > @@ -774,7 +774,7 @@ static ssize_t set_battery_life_extender(struct device *dev,
> >         return count;
> >  }
> >
> > -static DEVICE_ATTR(battery_life_extender, S_IWUSR | S_IRUGO,
> > +static DEVICE_ATTR(battery_life_extender, 0644,
> >                    get_battery_life_extender, set_battery_life_extender);
> >
> >  static int read_usb_charge(struct samsung_laptop *samsung)
> > @@ -843,7 +843,7 @@ static ssize_t set_usb_charge(struct device *dev,
> >         return count;
> >  }
> >
> > -static DEVICE_ATTR(usb_charge, S_IWUSR | S_IRUGO,
> > +static DEVICE_ATTR(usb_charge, 0644,
> >                    get_usb_charge, set_usb_charge);
> >
> >  static int read_lid_handling(struct samsung_laptop *samsung)
> > @@ -908,7 +908,7 @@ static ssize_t set_lid_handling(struct device *dev,
> >         return count;
> >  }
> >
> > -static DEVICE_ATTR(lid_handling, S_IWUSR | S_IRUGO,
> > +static DEVICE_ATTR(lid_handling, 0644,
> >                    get_lid_handling, set_lid_handling);
> >
> >  static struct attribute *platform_attributes[] = {
> > @@ -1291,24 +1291,17 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
> >         samsung->debug.sdiag_wrapper.data = samsung->sdiag;
> >         samsung->debug.sdiag_wrapper.size = strlen(samsung->sdiag);
> >
> > -       debugfs_create_u16("command", S_IRUGO | S_IWUSR, root,
> > -                          &samsung->debug.command);
> > -       debugfs_create_u32("d0", S_IRUGO | S_IWUSR, root,
> > -                          &samsung->debug.data.d0);
> > -       debugfs_create_u32("d1", S_IRUGO | S_IWUSR, root,
> > -                          &samsung->debug.data.d1);
> > -       debugfs_create_u16("d2", S_IRUGO | S_IWUSR, root,
> > -                          &samsung->debug.data.d2);
> > -       debugfs_create_u8("d3", S_IRUGO | S_IWUSR, root,
> > -                         &samsung->debug.data.d3);
> > -       debugfs_create_blob("data", S_IRUGO | S_IWUSR, root,
> > -                           &samsung->debug.data_wrapper);
> > -       debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, root,
> > +       debugfs_create_u16("command", 0644, root, &samsung->debug.command);
> > +       debugfs_create_u32("d0", 0644, root, &samsung->debug.data.d0);
> > +       debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1);
> > +       debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2);
> > +       debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3);
> > +       debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper);
> > +       debugfs_create_blob("f0000_segment", 0600, root,
> >                             &samsung->debug.f0000_wrapper);
> > -       debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
> > +       debugfs_create_file("call", S_IFREG | 0444, root, samsung,

Actually you may drop IFREG as well as debugfs will add it if there is
no conflicting file type defined.

> >                             &samsung_laptop_call_fops);
> > -       debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, root,
> > -                           &samsung->debug.sdiag_wrapper);
> > +       debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper);
> >  }
> >
> >  static void samsung_sabi_exit(struct samsung_laptop *samsung)
> > --
> > 2.30.0
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 17:00 ` [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
@ 2021-05-04 17:38   ` Andy Shevchenko
  2021-05-04 18:10     ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2021-05-04 17:38 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 8:18 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Those blobs can only be read. So, don't confuse users with 'writable'
> flags.

Not sure if this should be the second patch in the series (sounds like
a potential fix).
Either way
Reviewed-by: Andy Shevchenko <andy.shevchneko@gmail.com>

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Change since v1: use octal numbers
>
>  drivers/platform/x86/samsung-laptop.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
> index 763d97cbbe53..9aa0de8b7581 100644
> --- a/drivers/platform/x86/samsung-laptop.c
> +++ b/drivers/platform/x86/samsung-laptop.c
> @@ -1296,12 +1296,12 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
>         debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1);
>         debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2);
>         debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3);
> -       debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper);
> -       debugfs_create_blob("f0000_segment", 0600, root,
> +       debugfs_create_blob("data", 0444, root, &samsung->debug.data_wrapper);
> +       debugfs_create_blob("f0000_segment", 0400, root,
>                             &samsung->debug.f0000_wrapper);
>         debugfs_create_file("call", S_IFREG | 0444, root, samsung,
>                             &samsung_laptop_call_fops);
> -       debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper);
> +       debugfs_create_blob("sdiag", 0444, root, &samsung->debug.sdiag_wrapper);
>  }
>
>  static void samsung_sabi_exit(struct samsung_laptop *samsung)
> --
> 2.30.0
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 17:38   ` Andy Shevchenko
@ 2021-05-04 18:10     ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2021-05-04 18:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]


> Not sure if this should be the second patch in the series (sounds like
> a potential fix).

Not a fix. The write will be rejected anyhow. It just looks strange to
have writable permission when there is no proper callback for it.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions
  2021-05-04 17:37   ` Andy Shevchenko
@ 2021-05-17 10:02     ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2021-05-17 10:02 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]


> > > -       debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
> > > +       debugfs_create_file("call", S_IFREG | 0444, root, samsung,
> 
> Actually you may drop IFREG as well as debugfs will add it if there is
> no conflicting file type defined.

Oh, I missed this back then. Quoting only relevant parts of a message
helps me to avoid that ;)

I will add this, to patch 2, though. This is only a plain conversion. v3
coming in a minute.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-17 10:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 17:00 [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Wolfram Sang
2021-05-04 17:00 ` [PATCH v2 2/2] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
2021-05-04 17:38   ` Andy Shevchenko
2021-05-04 18:10     ` Wolfram Sang
2021-05-04 17:35 ` [PATCH v2 1/2] platform/x86: samsung-laptop: use octal numbers for rwx file permissions Andy Shevchenko
2021-05-04 17:37   ` Andy Shevchenko
2021-05-17 10:02     ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.