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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Nov 2020 23:51:38 +0530
From:   Soham Biswas <sohambiswas41@...il.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     thierry.reding@...il.com, u.kleine-koenig@...gutronix.de,
        linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: core: Use octal permission

This fixes the following warning:

`drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are
not preferred. Consider using octal permissions '0444'.`

generated by the following script:

`./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`


On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@...aro.org> wrote:
>
> On Tue, 17 Nov 2020, Soham Biswas wrote:
>
> > Fixed Warning.
>
> Which warning does this fix?
>
> > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
>
> This is semantically equivalent.
>
> Not sure what and/or how this fixes anything.
>
> > Signed-off-by: Soham Biswas <sohambiswas41@...il.com>
> > ---
> >  drivers/pwm/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> > index 1f16f5365d3c..a8eff4b3ee36 100644
> > --- a/drivers/pwm/core.c
> > +++ b/drivers/pwm/core.c
> > @@ -1338,7 +1338,7 @@ DEFINE_SEQ_ATTRIBUTE(pwm_debugfs);
> >
> >  static int __init pwm_debugfs_init(void)
> >  {
> > -     debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL,
> > +     debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL,
> >                           &pwm_debugfs_fops);
> >
> >       return 0;
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ