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
| ||
|
Message-ID: <CAHp75VdzbX7=n17xcdK6_fLwv5OmOePUkf3b0VZvpLDSZ947qQ@mail.gmail.com> Date: Sat, 13 Feb 2021 14:56:41 +0200 From: Andy Shevchenko <andy.shevchenko@...il.com> To: Drew Fustini <drew@...gleboard.org> Cc: Linus Walleij <linus.walleij@...aro.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Tony Lindgren <tony@...mide.com>, Alexandre Belloni <alexandre.belloni@...tlin.com>, Geert Uytterhoeven <geert@...ux-m68k.org>, Pantelis Antoniou <pantelis.antoniou@...sulko.com>, Jason Kridner <jkridner@...gleboard.org>, Robert Nelson <robertcnelson@...gleboard.org>, Joe Perches <joe@...ches.com>, Dan Carpenter <dan.carpenter@...cle.com> Subject: Re: [PATCH v5 1/2] pinctrl: use to octal permissions for debugfs files On Sat, Feb 13, 2021 at 12:30 AM Drew Fustini <drew@...gleboard.org> wrote: > > Switch over pinctrl debugfs files to use octal permissions as they are > preferred over symbolic permissions. Refer to commit f90774e1fd27 > ("checkpatch: look for symbolic permissions and suggest octal instead"). > > Note: S_IFREG flag is added to the mode by __debugfs_create_file() > in fs/debugfs/inode.c I guess it also needs Suggested-by: Joe (IIRC he proposed to convert the rest). Nevertheless, Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com> Thanks! > Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com> > Signed-off-by: Drew Fustini <drew@...gleboard.org> > --- > drivers/pinctrl/core.c | 12 ++++++------ > drivers/pinctrl/pinconf.c | 4 ++-- > drivers/pinctrl/pinmux.c | 4 ++-- > 3 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c > index 3663d87f51a0..07458742bc0f 100644 > --- a/drivers/pinctrl/core.c > +++ b/drivers/pinctrl/core.c > @@ -1888,11 +1888,11 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) > dev_name(pctldev->dev)); > return; > } > - debugfs_create_file("pins", S_IFREG | S_IRUGO, > + debugfs_create_file("pins", 0444, > device_root, pctldev, &pinctrl_pins_fops); > - debugfs_create_file("pingroups", S_IFREG | S_IRUGO, > + debugfs_create_file("pingroups", 0444, > device_root, pctldev, &pinctrl_groups_fops); > - debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, > + debugfs_create_file("gpio-ranges", 0444, > device_root, pctldev, &pinctrl_gpioranges_fops); > if (pctldev->desc->pmxops) > pinmux_init_device_debugfs(device_root, pctldev); > @@ -1914,11 +1914,11 @@ static void pinctrl_init_debugfs(void) > return; > } > > - debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO, > + debugfs_create_file("pinctrl-devices", 0444, > debugfs_root, NULL, &pinctrl_devices_fops); > - debugfs_create_file("pinctrl-maps", S_IFREG | S_IRUGO, > + debugfs_create_file("pinctrl-maps", 0444, > debugfs_root, NULL, &pinctrl_maps_fops); > - debugfs_create_file("pinctrl-handles", S_IFREG | S_IRUGO, > + debugfs_create_file("pinctrl-handles", 0444, > debugfs_root, NULL, &pinctrl_fops); > } > > diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c > index 02c075cc010b..d9d54065472e 100644 > --- a/drivers/pinctrl/pinconf.c > +++ b/drivers/pinctrl/pinconf.c > @@ -370,9 +370,9 @@ DEFINE_SHOW_ATTRIBUTE(pinconf_groups); > void pinconf_init_device_debugfs(struct dentry *devroot, > struct pinctrl_dev *pctldev) > { > - debugfs_create_file("pinconf-pins", S_IFREG | S_IRUGO, > + debugfs_create_file("pinconf-pins", 0444, > devroot, pctldev, &pinconf_pins_fops); > - debugfs_create_file("pinconf-groups", S_IFREG | S_IRUGO, > + debugfs_create_file("pinconf-groups", 0444, > devroot, pctldev, &pinconf_groups_fops); > } > > diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c > index bab888fe3f8e..c651b2db0925 100644 > --- a/drivers/pinctrl/pinmux.c > +++ b/drivers/pinctrl/pinmux.c > @@ -676,9 +676,9 @@ DEFINE_SHOW_ATTRIBUTE(pinmux_pins); > void pinmux_init_device_debugfs(struct dentry *devroot, > struct pinctrl_dev *pctldev) > { > - debugfs_create_file("pinmux-functions", S_IFREG | S_IRUGO, > + debugfs_create_file("pinmux-functions", 0444, > devroot, pctldev, &pinmux_functions_fops); > - debugfs_create_file("pinmux-pins", S_IFREG | S_IRUGO, > + debugfs_create_file("pinmux-pins", 0444, > devroot, pctldev, &pinmux_pins_fops); > } > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko
Powered by blists - more mailing lists