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: <da94449e-d250-1b44-0e72-f951b73b1946@roeck-us.net> Date: Fri, 25 Nov 2022 16:37:08 -0800 From: Guenter Roeck <linux@...ck-us.net> To: Thomas Weißschuh <linux@...ssschuh.net>, Wim Van Sebroeck <wim@...ux-watchdog.org> Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] watchdog: Report firmware_version in sysfs On 11/25/22 14:23, Thomas Weißschuh wrote: > This synchronizes the information reported by ioctl and sysfs. > The mismatch is confusing because "wdctl" from util-linux uses the ioctl > when used with root privileges and sysfs without. > > Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net> > > --- > > Userspace implementation: > > https://github.com/util-linux/util-linux/pull/1927 > --- > drivers/watchdog/watchdog_dev.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c > index 55574ed42504..88c76e27873c 100644 > --- a/drivers/watchdog/watchdog_dev.c > +++ b/drivers/watchdog/watchdog_dev.c > @@ -555,6 +555,15 @@ static ssize_t identity_show(struct device *dev, struct device_attribute *attr, > } > static DEVICE_ATTR_RO(identity); > > +static ssize_t firmware_version_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct watchdog_device *wdd = dev_get_drvdata(dev); > + > + return sysfs_emit(buf, "%d\n", wdd->info->firmware_version); > +} > +static DEVICE_ATTR_RO(firmware_version); > + > static ssize_t state_show(struct device *dev, struct device_attribute *attr, > char *buf) > { > @@ -618,6 +627,7 @@ static umode_t wdt_is_visible(struct kobject *kobj, struct attribute *attr, > static struct attribute *wdt_attrs[] = { > &dev_attr_state.attr, > &dev_attr_identity.attr, > + &dev_attr_firmware_version.attr, > &dev_attr_timeout.attr, > &dev_attr_min_timeout.attr, > &dev_attr_max_timeout.attr, > > base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536 I think this conflicts with drivers/watchdog/ziirave_wdt.c which generates its own firmnware_version attribute. Guenter
Powered by blists - more mailing lists