<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/platform, branch v6.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-09-02T17:35:51Z</updated>
<entry>
<title>Merge tag 'platform-drivers-x86-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86</title>
<updated>2022-09-02T17:35:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-09-02T17:35:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a2f6a3722a7c127817af24efb309e5bf70afe36'/>
<id>urn:sha1:1a2f6a3722a7c127817af24efb309e5bf70afe36</id>
<content type='text'>
Pull x86 platform driver fixes from Hans de Goede:
 "Various small fixes and hardware-id additions"

* tag 'platform-drivers-x86-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: p2sb: Fix UAF when caller uses resource name
  platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32
  platform/mellanox: Remove redundant 'NULL' check
  platform/mellanox: Remove unnecessary code
  platform/mellanox: mlxreg-lc: Fix locking issue
  platform/mellanox: mlxreg-lc: Fix coverity warning
  platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes
  platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup
  platform/x86: asus-wmi: Fix the name of the mic-mute LED classdev
  platform/surface: aggregator_registry: Add HID devices for sensors and UCSI client to SP8
  platform/surface: aggregator_registry: Rename HID device nodes based on new findings
  platform/surface: aggregator_registry: Rename HID device nodes based on their function
  platform/surface: aggregator_registry: Add support for Surface Laptop Go 2
  platform/x86: x86-android-tablets: Fix broken touchscreen on Chuwi Hi8 with Windows BIOS
  platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask
</content>
</entry>
<entry>
<title>platform/x86: p2sb: Fix UAF when caller uses resource name</title>
<updated>2022-09-01T15:51:34Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-09-01T11:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=647e82dbf85124697be59a4b4cf00c0d38177dcb'/>
<id>urn:sha1:647e82dbf85124697be59a4b4cf00c0d38177dcb</id>
<content type='text'>
We have to copy only selected fields from the original resource.
Because a PCI device will be removed immediately after getting
its resources, we may not use any allocated data, hence we may
not copy any pointers.

Consider the following scenario:

  1/ a caller of p2sb_bar() gets the resource;

  2/ the resource has been copied by platform_device_add_data()
     in order to create a platform device;

  3/ the platform device creation will call for the device driver's
     -&gt;probe() as soon as a match found;

  4/ the -&gt;probe() takes given resources (see 2/) and tries to
     access one of its field, i.e. 'name', in the
     __devm_ioremap_resource() to create a pretty looking output;

  5/ but the 'name' is a dangling pointer because p2sb_bar()
     removed a PCI device, which 'name' had been copied to
     the caller's memory.

  6/ UAF (Use-After-Free) as a result.

Kudos to Mika for the initial analisys of the issue.

Fixes: 9745fb07474f ("platform/x86/intel: Add Primary to Sideband (P2SB) bridge support")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Suggested-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/linux-i2c/YvPCbnKqDiL2XEKp@xsang-OptiPlex-9020/
Link: https://lore.kernel.org/linux-i2c/YtjAswDKfiuDfWYs@xsang-OptiPlex-9020/
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220901113406.65876-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32</title>
<updated>2022-09-01T15:51:34Z</updated>
<author>
<name>Luke D. Jones</name>
<email>luke@ljones.dev</email>
</author>
<published>2022-08-28T07:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5542dfc582f4a925f67bbfaf8f62ca83506032ae'/>
<id>urn:sha1:5542dfc582f4a925f67bbfaf8f62ca83506032ae</id>
<content type='text'>
Fix for TUF laptops returning with an -ENOSPC on calling
asus_wmi_evaluate_method_buf() when fetching default curves. The TUF method
requires at least 32 bytes space.

This also moves and changes the pr_debug() in fan_curve_check_present() to
pr_warn() in fan_curve_get_factory_default() so that there is at least some
indication in logs of why it fails.

Signed-off-by: Luke D. Jones &lt;luke@ljones.dev&gt;
Link: https://lore.kernel.org/r/20220828074638.5473-1-luke@ljones.dev
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/mellanox: Remove redundant 'NULL' check</title>
<updated>2022-09-01T12:22:48Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@nvidia.com</email>
</author>
<published>2022-08-23T20:19:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=791ae8e8960efbf2e331eae7110db65b4f9f9083'/>
<id>urn:sha1:791ae8e8960efbf2e331eae7110db65b4f9f9083</id>
<content type='text'>
Remove 'NULL' check for 'data-&gt;hpdev.client' in error flow of
mlxreg_lc_probe(). It cannot be 'NULL' at this point.

Fixes: b4b830a34d80  ("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220823201937.46855-5-vadimp@nvidia.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/mellanox: Remove unnecessary code</title>
<updated>2022-09-01T12:22:48Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@nvidia.com</email>
</author>
<published>2022-08-23T20:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2f92fdd043d548a14287889742e147f8ed4ee03d'/>
<id>urn:sha1:2f92fdd043d548a14287889742e147f8ed4ee03d</id>
<content type='text'>
Remove redundant 'NULL' check for of if 'data-&gt;notifier'.

Replace 'return err' by 'return 0' in mlxreg_lc_probe().

Fixes: 62f9529b8d5c87b ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220823201937.46855-4-vadimp@nvidia.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/mellanox: mlxreg-lc: Fix locking issue</title>
<updated>2022-09-01T12:22:48Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@nvidia.com</email>
</author>
<published>2022-08-23T20:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e092b7faa6b507125b69c92a51bb22c2d549d37'/>
<id>urn:sha1:1e092b7faa6b507125b69c92a51bb22c2d549d37</id>
<content type='text'>
Fix locking issues:
- mlxreg_lc_state_update() takes a lock when set or clear
  "MLXREG_LC_POWERED".
- All the devices can be deleted before MLXREG_LC_POWERED flag is cleared.

To fix it:
- Add lock() / unlock() at the beginning / end of
  mlxreg_lc_event_handler() and remove locking from
  mlxreg_lc_power_on_off() and mlxreg_lc_enable_disable()
- Add locked version of mlxreg_lc_state_update() -
  mlxreg_lc_state_update_locked() for using outside
  mlxreg_lc_event_handler().

(2) Remove redundant NULL check for of if 'data-&gt;notifier'.

Fixes: 62f9529b8d5c87b ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220823201937.46855-3-vadimp@nvidia.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/mellanox: mlxreg-lc: Fix coverity warning</title>
<updated>2022-09-01T12:22:48Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@nvidia.com</email>
</author>
<published>2022-08-23T20:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17c2bd6bea4c32fe691c1f9ebcc20fd48d77454a'/>
<id>urn:sha1:17c2bd6bea4c32fe691c1f9ebcc20fd48d77454a</id>
<content type='text'>
Fix smatch warning:
drivers/platform/mellanox/mlxreg-lc.c:866 mlxreg_lc_probe() warn: passing zero to 'PTR_ERR'
by removing 'err = PTR_ERR(regmap)'.

Fixes: b4b830a34d80 ("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220823201937.46855-2-vadimp@nvidia.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes</title>
<updated>2022-09-01T12:22:48Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-08-29T16:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3b82d26bc85f5fc2fef5ec8cce17c89633a55a8'/>
<id>urn:sha1:c3b82d26bc85f5fc2fef5ec8cce17c89633a55a8</id>
<content type='text'>
2 keymap fixes for the Acer Aspire One AOD270 and the same hardware
rebranded as Packard Bell Dot SC:

1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC,
this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping
for this.

2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate
input event with the "Video Bus" input device events. But on these devices
the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN
instead of using KE_IGNORE so that udev/hwdb can override it on these devs.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20220829163544.5288-1-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup</title>
<updated>2022-08-26T10:56:12Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-08-19T18:01:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=343b62048ba4cec6b8b890092bcc200e1eb83424'/>
<id>urn:sha1:343b62048ba4cec6b8b890092bcc200e1eb83424</id>
<content type='text'>
It was observed that on a Thinkpad T14 Gen1 (AMD) that the platform
profile is starting up in 'low-power' mode after refreshing what the
firmware had.  This is most likely a firmware bug, but as a harmless
workaround set the default profile to 'balanced' at thinkpad_acpi startup.

Reported-by: madcatx@atlas.cz
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216347
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20220819180101.6383-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: asus-wmi: Fix the name of the mic-mute LED classdev</title>
<updated>2022-08-26T09:53:41Z</updated>
<author>
<name>PaddyKP_Yao</name>
<email>PaddyKP_Yao@asus.com</email>
</author>
<published>2022-08-25T00:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee653d2d8f7c935a00f01a7654d889e8ce55b00e'/>
<id>urn:sha1:ee653d2d8f7c935a00f01a7654d889e8ce55b00e</id>
<content type='text'>
According to well-known-leds.txt, we should use "platform::micmute"
instead of "asus::micmute" for the name of the mic-mute LED classdev.

Signed-off-by: PaddyKP_Yao &lt;PaddyKP_Yao@asus.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20220825004305.709539-1-PaddyKP_Yao@asus.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
</feed>
