lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 19 May 2021 15:42:56 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        linux-kernel@...r.kernel.org
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Corentin Chary <corentin.chary@...il.com>,
        Mark Gross <mgross@...ux.intel.com>,
        platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v3 1/2] platform/x86: samsung-laptop: use octal numbers
 for rwx file permissions

Hi,

On 5/17/21 12:07 PM, Wolfram Sang wrote:
> Andy asked me to do it before working further on the code.
> 
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans



> ---
> 
> change since v2: added Andy's tag
> 
>  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)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ