<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/device_sysfs.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-13T20:34:03+00:00</updated>
<entry>
<title>ACPI: sysfs: Use ACPI_FREE() for freeing an ACPI object</title>
<updated>2025-11-13T20:34:03+00:00</updated>
<author>
<name>Kaushlendra Kumar</name>
<email>kaushlendra.kumar@intel.com</email>
</author>
<published>2025-08-22T06:19:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c0cc3080aae076e463b8bc7778e5688dcc588dcc'/>
<id>urn:sha1:c0cc3080aae076e463b8bc7778e5688dcc588dcc</id>
<content type='text'>
[ Upstream commit 149139ddcb99583fdec8d1eaf7dada41e5896101 ]

Since str_obj is allocated by ACPICA in acpi_evaluate_object_typed(),
it should be free with ACPI_FREE() rather than with kfree(), so use
the former instead of the latter for freeing it.

Signed-off-by: Kaushlendra Kumar &lt;kaushlendra.kumar@intel.com&gt;
Link: https://patch.msgid.link/20250822061946.472594-1-kaushlendra.kumar@intel.com
[ rjw: Subject and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: remove return value of acpi_device_setup_files()</title>
<updated>2024-08-02T14:44:22+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-09T20:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb664e50a9e0471fcaf0b2d84ee46a764cd2258d'/>
<id>urn:sha1:bb664e50a9e0471fcaf0b2d84ee46a764cd2258d</id>
<content type='text'>
The function can not fail anymore, so drop its return value.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-5-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: manage sysfs attributes through device core</title>
<updated>2024-08-02T14:44:22+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-09T20:37:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd4884724500232480cf79d8762f3cd716ba4c1b'/>
<id>urn:sha1:cd4884724500232480cf79d8762f3cd716ba4c1b</id>
<content type='text'>
Now that the ACPI sysfs attributes are organized around an
attribute_group, the device core can manage them.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-4-058ab0667fa8@weissschuh.net
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: manage attributes as attribute_group</title>
<updated>2024-08-02T14:44:22+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-09T20:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6bae04a40f4441c62f4f8cd3bbe0ecf8b54033e'/>
<id>urn:sha1:f6bae04a40f4441c62f4f8cd3bbe0ecf8b54033e</id>
<content type='text'>
The current manual attribute management is inconsistent and brittle.

Not all return values of device_create_file() are checked and the
cleanup logic needs to be kept up to date manually.

Moving all attributes into an attribute_group and using the is_visible()
callback allows the management of all attributes as a single unit.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-3-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: evaluate _STR on each sysfs access</title>
<updated>2024-08-02T14:44:22+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-09T20:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52831d9bbc9aa029aed525dfbe61cb78c1db991c'/>
<id>urn:sha1:52831d9bbc9aa029aed525dfbe61cb78c1db991c</id>
<content type='text'>
The handling of the _STR method is inconsistent with the other method
evaluations. It is the only method which is cached.

The cached value stored in 'struct acpi_device_pnp' has a different
lifetime than the other struct members.

Commit d1efe3c324ea ("ACPI: Add new sysfs interface to export device description")
does not explain this difference.

Evaluating the method every time also removes the necessity to manage
the lifetime of the cached value, which would be a problem when managing
the sysfs attributes through the device core.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-2-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: validate return type of _STR method</title>
<updated>2024-08-02T14:44:22+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-09T20:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bb1e7d027413835b086aed35bc3f0713bc0f72b'/>
<id>urn:sha1:4bb1e7d027413835b086aed35bc3f0713bc0f72b</id>
<content type='text'>
Only buffer objects are valid return values of _STR.

If something else is returned description_show() will access invalid
memory.

Fixes: d1efe3c324ea ("ACPI: Add new sysfs interface to export device description")
Cc: All applicable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-1-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'acpi-ec', 'acpi-sysfs', 'acpi-misc' and 'acpi-uid'</title>
<updated>2023-10-26T12:59:52+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2023-10-26T12:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8c3c7f97aa79c93713aecba5bdf83273076cf5d'/>
<id>urn:sha1:e8c3c7f97aa79c93713aecba5bdf83273076cf5d</id>
<content type='text'>
Merge ACPI EC driver updates, ACPI sysfs interface updates, misc updates
related to ACPI and changes related to ACPI _UID handling for 6.7-rc1:

 - Add EC GPE detection quirk for HP 250 G7 Notebook PC (Jonathan
   Denose).

 - Fix and clean up create_pnp_modalias() and create_of_modalias()
   (Christophe JAILLET).

 - Modify 2 pieces of code to use acpi_evaluate_dsm_typed() (Andy
   Shevchenko).

 - Define acpi_dev_uid_match() for matching _UID and use it in several
   places (Raag Jadav).

 - Use acpi_device_uid() for fetching _UID in 2 places (Raag Jadav).

* acpi-ec:
  ACPI: EC: Add quirk for HP 250 G7 Notebook PC

* acpi-sysfs:
  ACPI: sysfs: Clean up create_pnp_modalias() and create_of_modalias()
  ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()

* acpi-misc:
  ACPI: x86: s2idle: Switch to use acpi_evaluate_dsm_typed()
  ACPI: PCI: Switch to use acpi_evaluate_dsm_typed()

* acpi-uid:
  perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID
  ACPI: x86: use acpi_dev_uid_match() for matching _UID
  ACPI: utils: use acpi_dev_uid_match() for matching _UID
  pinctrl: intel: use acpi_dev_uid_match() for matching _UID
  ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID
  perf: qcom: use acpi_device_uid() for fetching _UID
  ACPI: sysfs: use acpi_device_uid() for fetching _UID
</content>
</entry>
<entry>
<title>ACPI: sysfs: Clean up create_pnp_modalias() and create_of_modalias()</title>
<updated>2023-10-24T19:31:26+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-10-23T19:33:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc8f7abe97159ee68106e5a99d5fc242cd01f150'/>
<id>urn:sha1:bc8f7abe97159ee68106e5a99d5fc242cd01f150</id>
<content type='text'>
'modalias' is only written with snprintf() and it is already guaranteed
to be nul-terminated, so remove the unneeded (but harmless) writes of a
trailing '\0' to it.

Also snprintf() never returns negative values, so remove redundant (but
harmless) checks for it.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
[ rjw: Merge two patches into one, combine changelogs, add subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()</title>
<updated>2023-10-24T19:31:26+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-10-23T18:32:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48cf49d31994ff97b33c4044e618560ec84d35fb'/>
<id>urn:sha1:48cf49d31994ff97b33c4044e618560ec84d35fb</id>
<content type='text'>
snprintf() does not return negative values on error.

To know if the buffer was too small, the returned value needs to be
compared with the length of the passed buffer. If it is greater or
equal, the output has been truncated, so add checks for the truncation
to create_pnp_modalias() and create_of_modalias(). Also make them
return -ENOMEM in that case, as they already do that elsewhere.

Moreover, the remaining size of the buffer used by snprintf() needs to
be updated after the first write to avoid out-of-bounds access as
already done correctly in create_pnp_modalias(), but not in
create_of_modalias(), so change the latter accordingly.

Fixes: 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
[ rjw: Merge two patches into one, combine changelogs, add subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: sysfs: use acpi_device_uid() for fetching _UID</title>
<updated>2023-10-20T17:17:41+00:00</updated>
<author>
<name>Raag Jadav</name>
<email>raag.jadav@intel.com</email>
</author>
<published>2023-10-20T08:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f70fd1892e7a0c94a99c1ad2d0656fc43c1712c'/>
<id>urn:sha1:5f70fd1892e7a0c94a99c1ad2d0656fc43c1712c</id>
<content type='text'>
Convert manual _UID references to use the standard ACPI helper.

Signed-off-by: Raag Jadav &lt;raag.jadav@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
