<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/hid, branch v5.13</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>HID: asus: Cleanup Asus T101HA keyboard-dock handling</title>
<updated>2021-05-27T13:40:35+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-05-05T21:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a94f66aecdaa498d83314cadac466d8b65674b94'/>
<id>a94f66aecdaa498d83314cadac466d8b65674b94</id>
<content type='text'>
There is no need to use a quirk and then return -ENODEV from the
asus_probe() function to avoid that hid-asus binds to the hiddev
for the USB-interface for the hid-multitouch touchpad.

The hid-multitouch hiddev has a group of HID_GROUP_MULTITOUCH_WIN_8,
so the same result can be achieved by making the hid_device_id entry
for the dock in the asus_devices[] table only match on HID_GROUP_GENERIC
instead of having it match HID_GROUP_ANY.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to use a quirk and then return -ENODEV from the
asus_probe() function to avoid that hid-asus binds to the hiddev
for the USB-interface for the hid-multitouch touchpad.

The hid-multitouch hiddev has a group of HID_GROUP_MULTITOUCH_WIN_8,
so the same result can be achieved by making the hid_device_id entry
for the dock in the asus_devices[] table only match on HID_GROUP_GENERIC
instead of having it match HID_GROUP_ANY.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: magicmouse: fix NULL-deref on disconnect</title>
<updated>2021-05-27T13:40:35+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-05-17T10:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4b4f6cecca446abcb686c6e6c451d4f1ec1a7497'/>
<id>4b4f6cecca446abcb686c6e6c451d4f1ec1a7497</id>
<content type='text'>
Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic
Trackpad 2") added a sanity check for an Apple trackpad but returned
success instead of -ENODEV when the check failed. This means that the
remove callback will dereference the never-initialised driver data
pointer when the driver is later unbound (e.g. on USB disconnect).

Reported-by: syzbot+ee6f6e2e68886ca256a8@syzkaller.appspotmail.com
Fixes: 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2")
Cc: stable@vger.kernel.org      # 4.20
Cc: Claudio Mettler &lt;claudio@ponyfleisch.ch&gt;
Cc: Marek Wyborski &lt;marek.wyborski@emwesoft.com&gt;
Cc: Sean O'Brien &lt;seobrien@chromium.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic
Trackpad 2") added a sanity check for an Apple trackpad but returned
success instead of -ENODEV when the check failed. This means that the
remove callback will dereference the never-initialised driver data
pointer when the driver is later unbound (e.g. on USB disconnect).

Reported-by: syzbot+ee6f6e2e68886ca256a8@syzkaller.appspotmail.com
Fixes: 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2")
Cc: stable@vger.kernel.org      # 4.20
Cc: Claudio Mettler &lt;claudio@ponyfleisch.ch&gt;
Cc: Marek Wyborski &lt;marek.wyborski@emwesoft.com&gt;
Cc: Sean O'Brien &lt;seobrien@chromium.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: intel-ish-hid: ipc: Add Alder Lake device IDs</title>
<updated>2021-05-27T13:40:35+00:00</updated>
<author>
<name>Ye Xiang</name>
<email>xiang.ye@intel.com</email>
</author>
<published>2021-05-17T06:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=22db5e0003e1441cd829180cebb42f7a6b7a46b7'/>
<id>22db5e0003e1441cd829180cebb42f7a6b7a46b7</id>
<content type='text'>
Add Alder Lake PCI device IDs to the supported device list.

Signed-off-by: Ye Xiang &lt;xiang.ye@intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Alder Lake PCI device IDs to the supported device list.

Signed-off-by: Ye Xiang &lt;xiang.ye@intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: i2c-hid: fix format string mismatch</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-05-14T13:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dc5f9f55502e13ba05731d5046a14620aa2ff456'/>
<id>dc5f9f55502e13ba05731d5046a14620aa2ff456</id>
<content type='text'>
clang doesn't like printing a 32-bit integer using %hX format string:

drivers/hid/i2c-hid/i2c-hid-core.c:994:18: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client-&gt;name, hid-&gt;vendor, hid-&gt;product);
                               ^~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:994:31: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client-&gt;name, hid-&gt;vendor, hid-&gt;product);
                                            ^~~~~~~~~~~~

Use an explicit cast to truncate it to the low 16 bits instead.

Fixes: 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clang doesn't like printing a 32-bit integer using %hX format string:

drivers/hid/i2c-hid/i2c-hid-core.c:994:18: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client-&gt;name, hid-&gt;vendor, hid-&gt;product);
                               ^~~~~~~~~~~
drivers/hid/i2c-hid/i2c-hid-core.c:994:31: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
                 client-&gt;name, hid-&gt;vendor, hid-&gt;product);
                                            ^~~~~~~~~~~~

Use an explicit cast to truncate it to the low 16 bits instead.

Fixes: 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: amd_sfh: Fix memory leak in amd_sfh_work</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Basavaraj Natikar</name>
<email>Basavaraj.Natikar@amd.com</email>
</author>
<published>2021-05-12T13:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5ad755fd2b326aa2bc8910b0eb351ee6aece21b1'/>
<id>5ad755fd2b326aa2bc8910b0eb351ee6aece21b1</id>
<content type='text'>
Kmemleak tool detected a memory leak in the amd_sfh driver.

====================
unreferenced object 0xffff88810228ada0 (size 32):
  comm "insmod", pid 3968, jiffies 4295056001 (age 775.792s)
  hex dump (first 32 bytes):
    00 20 73 1f 81 88 ff ff 00 01 00 00 00 00 ad de  . s.............
    22 01 00 00 00 00 ad de 01 00 02 00 00 00 00 00  "...............
  backtrace:
    [&lt;000000007b4c8799&gt;] kmem_cache_alloc_trace+0x163/0x4f0
    [&lt;0000000005326893&gt;] amd_sfh_get_report+0xa4/0x1d0 [amd_sfh]
    [&lt;000000002a9e5ec4&gt;] amdtp_hid_request+0x62/0x80 [amd_sfh]
    [&lt;00000000b8a95807&gt;] sensor_hub_get_feature+0x145/0x270 [hid_sensor_hub]
    [&lt;00000000fda054ee&gt;] hid_sensor_parse_common_attributes+0x215/0x460 [hid_sensor_iio_common]
    [&lt;0000000021279ecf&gt;] hid_accel_3d_probe+0xff/0x4a0 [hid_sensor_accel_3d]
    [&lt;00000000915760ce&gt;] platform_probe+0x6a/0xd0
    [&lt;0000000060258a1f&gt;] really_probe+0x192/0x620
    [&lt;00000000fa812f2d&gt;] driver_probe_device+0x14a/0x1d0
    [&lt;000000005e79f7fd&gt;] __device_attach_driver+0xbd/0x110
    [&lt;0000000070d15018&gt;] bus_for_each_drv+0xfd/0x160
    [&lt;0000000013a3c312&gt;] __device_attach+0x18b/0x220
    [&lt;000000008c7b4afc&gt;] device_initial_probe+0x13/0x20
    [&lt;00000000e6e99665&gt;] bus_probe_device+0xfe/0x120
    [&lt;00000000833fa90b&gt;] device_add+0x6a6/0xe00
    [&lt;00000000fa901078&gt;] platform_device_add+0x180/0x380
====================

The fix is to freeing request_list entry once the processed entry is
removed from the request_list.

Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kmemleak tool detected a memory leak in the amd_sfh driver.

====================
unreferenced object 0xffff88810228ada0 (size 32):
  comm "insmod", pid 3968, jiffies 4295056001 (age 775.792s)
  hex dump (first 32 bytes):
    00 20 73 1f 81 88 ff ff 00 01 00 00 00 00 ad de  . s.............
    22 01 00 00 00 00 ad de 01 00 02 00 00 00 00 00  "...............
  backtrace:
    [&lt;000000007b4c8799&gt;] kmem_cache_alloc_trace+0x163/0x4f0
    [&lt;0000000005326893&gt;] amd_sfh_get_report+0xa4/0x1d0 [amd_sfh]
    [&lt;000000002a9e5ec4&gt;] amdtp_hid_request+0x62/0x80 [amd_sfh]
    [&lt;00000000b8a95807&gt;] sensor_hub_get_feature+0x145/0x270 [hid_sensor_hub]
    [&lt;00000000fda054ee&gt;] hid_sensor_parse_common_attributes+0x215/0x460 [hid_sensor_iio_common]
    [&lt;0000000021279ecf&gt;] hid_accel_3d_probe+0xff/0x4a0 [hid_sensor_accel_3d]
    [&lt;00000000915760ce&gt;] platform_probe+0x6a/0xd0
    [&lt;0000000060258a1f&gt;] really_probe+0x192/0x620
    [&lt;00000000fa812f2d&gt;] driver_probe_device+0x14a/0x1d0
    [&lt;000000005e79f7fd&gt;] __device_attach_driver+0xbd/0x110
    [&lt;0000000070d15018&gt;] bus_for_each_drv+0xfd/0x160
    [&lt;0000000013a3c312&gt;] __device_attach+0x18b/0x220
    [&lt;000000008c7b4afc&gt;] device_initial_probe+0x13/0x20
    [&lt;00000000e6e99665&gt;] bus_probe_device+0xfe/0x120
    [&lt;00000000833fa90b&gt;] device_add+0x6a6/0xe00
    [&lt;00000000fa901078&gt;] platform_device_add+0x180/0x380
====================

The fix is to freeing request_list entry once the processed entry is
removed from the request_list.

Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: amd_sfh: Use devm_kzalloc() instead of kzalloc()</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Basavaraj Natikar</name>
<email>Basavaraj.Natikar@amd.com</email>
</author>
<published>2021-05-12T13:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e3d6a599969b8244eeb447e372ec3b1eddd7534e'/>
<id>e3d6a599969b8244eeb447e372ec3b1eddd7534e</id>
<content type='text'>
Replace kzalloc with devm_kzalloc in driver initialization sequence. The
allocation can be tied to the lifetime of the amd_sfh driver. This cleans
up an exit &amp; error paths, since the objects does not need to be
explicitly freed anymore.

Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace kzalloc with devm_kzalloc in driver initialization sequence. The
allocation can be tied to the lifetime of the amd_sfh driver. This cleans
up an exit &amp; error paths, since the objects does not need to be
explicitly freed anymore.

Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: ft260: improve error handling of ft260_hid_feature_report_get()</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Michael Zaidman</name>
<email>michael.zaidman@gmail.com</email>
</author>
<published>2021-05-11T10:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=82f09a637dd3215bce5314664f0171cdc3e43bb5'/>
<id>82f09a637dd3215bce5314664f0171cdc3e43bb5</id>
<content type='text'>
The ft260_hid_feature_report_get() checks if the return size matches the
requested size. But the function can also fail with at least -ENOMEM.  Add the
&lt; 0 checks.

In ft260_hid_feature_report_get(), do not do the memcpy to the caller's buffer
if there is an error.

Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Michael Zaidman &lt;michael.zaidman@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ft260_hid_feature_report_get() checks if the return size matches the
requested size. But the function can also fail with at least -ENOMEM.  Add the
&lt; 0 checks.

In ft260_hid_feature_report_get(), do not do the memcpy to the caller's buffer
if there is an error.

Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Michael Zaidman &lt;michael.zaidman@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: magicmouse: fix crash when disconnecting Magic Trackpad 2</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2021-05-10T06:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4fb125192563670e820991de48f8db495ecc7ff7'/>
<id>4fb125192563670e820991de48f8db495ecc7ff7</id>
<content type='text'>
When the Apple Magic Trackpad 2 is connected over USB it registers four
hid_device report descriptors, however, the driver only handles the one
with type HID_TYPE_USBMOUSE and ignores the other three, thus, no driver
data is attached to them.

When the device is disconnected, the remove callback is called for the
four hid_device report descriptors, crashing when the driver data is
NULL.

Check that the driver data is not NULL before using it in the remove
callback.

Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the Apple Magic Trackpad 2 is connected over USB it registers four
hid_device report descriptors, however, the driver only handles the one
with type HID_TYPE_USBMOUSE and ignores the other three, thus, no driver
data is attached to them.

When the device is disconnected, the remove callback is called for the
four hid_device report descriptors, crashing when the driver data is
NULL.

Check that the driver data is not NULL before using it in the remove
callback.

Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: gt683r: add missing MODULE_DEVICE_TABLE</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Bixuan Cui</name>
<email>cuibixuan@huawei.com</email>
</author>
<published>2021-05-08T03:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a4b494099ad657f1cb85436d333cf38870ee95bc'/>
<id>a4b494099ad657f1cb85436d333cf38870ee95bc</id>
<content type='text'>
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Bixuan Cui &lt;cuibixuan@huawei.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Bixuan Cui &lt;cuibixuan@huawei.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: pidff: fix error return code in hid_pidff_init()</title>
<updated>2021-05-27T13:40:34+00:00</updated>
<author>
<name>Zhen Lei</name>
<email>thunder.leizhen@huawei.com</email>
</author>
<published>2021-05-08T02:47:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3dd653c077efda8152f4dd395359617d577a54cd'/>
<id>3dd653c077efda8152f4dd395359617d577a54cd</id>
<content type='text'>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
