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]
Message-ID: <20170626170611.GC20491@roeck-us.net>
Date:   Mon, 26 Jun 2017 10:06:11 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:     Jean Delvare <jdelvare@...e.de>, linux-kernel@...r.kernel.org,
        Fenghua Yu <fenghua.yu@...el.com>, linux-hwmon@...r.kernel.org
Subject: Re: userspace regression with hwmon

On Mon, Jun 26, 2017 at 03:33:20PM +0100, Sudip Mukherjee wrote:
> Hi Guenter, Jean,
> 
> The patch d72d19c26c41 ("hwmon: (coretemp) Convert to use
> devm_hwmon_device_register_with_groups") has changed the location of the
> sysfs nodes from /sys/devices/platform/coretemp.0/ to
> /sys/devices/platform/coretemp.0/hwmon/hwmon0/ and that has broken
> some of our usespace applications when we have updated the kernel from
> v3.8 to v4.4. For now I am reverting that said patch in our production
> kernel (based on v4.4) but that is not an elegant solution.
> Do you have any other reports like this? I am sure changing the paths
> upstream will now break some other userspace. So, what can be an elegant
> solution to our problem? or do we always need to carry an out-of-tree
> patch for our production kernel?
> 

The problem only occurs if attributes are accessed using the raw path,
and if user space does not take into account that attributes may reside
in the hwmon directory (/sys/class/hwmon/hwmonX) _or_ in the device
directory (/sys/class/hwmon/hwmonX/device). There is no guarantee that
the raw path doesn't change from release to release; that is what the
symlinks are for. Actually, I have seen the raw platform device path
change over time, so I am surprised that this never affected you.

You might consider using libsensors to access the attributes.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ