All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jean Delvare <jdelvare@suse.de>,
	linux-kernel@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: userspace regression with hwmon
Date: Mon, 26 Jun 2017 10:06:11 -0700	[thread overview]
Message-ID: <20170626170611.GC20491@roeck-us.net> (raw)
In-Reply-To: <20170626143320.GA1976@sudip-tp>

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

  reply	other threads:[~2017-06-26 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 14:33 userspace regression with hwmon Sudip Mukherjee
2017-06-26 17:06 ` Guenter Roeck [this message]
2017-06-27 12:23   ` Sudip Mukherjee
2017-06-27 12:52     ` Guenter Roeck
2017-06-27 13:34       ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170626170611.GC20491@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=fenghua.yu@intel.com \
    --cc=jdelvare@suse.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.