<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hid/wacom_sys.c, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-04-07T16:46:20Z</updated>
<entry>
<title>HID: wacom_sys: Demote kernel-doc abuse</title>
<updated>2021-04-07T16:46:20Z</updated>
<author>
<name>Lee Jones</name>
</author>
<published>2021-03-26T14:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1784cd57e35f8cc5981cb1e632561e74956cd007'/>
<id>urn:sha1:1784cd57e35f8cc5981cb1e632561e74956cd007</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/hid/wacom_sys.c:1505: warning: Function parameter or member 'wacom' not described in 'wacom_led_next'
 drivers/hid/wacom_sys.c:1505: warning: Function parameter or member 'cur' not described in 'wacom_led_next'

Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: wacom: convert sysfs sprintf/snprintf family to sysfs_emit</title>
<updated>2021-02-05T09:16:45Z</updated>
<author>
<name>Jiapeng Chong</name>
</author>
<published>2021-02-02T08:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d883312489df262501d635b706be43080b30f1ec'/>
<id>urn:sha1:d883312489df262501d635b706be43080b30f1ec</id>
<content type='text'>
Fix the following coccicheck warning:

./drivers/hid/wacom_sys.c:1828:8-16: WARNING: use scnprintf or sprintf.

Reported-by: Abaci Robot&lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Correct NULL dereference on AES pen proximity</title>
<updated>2021-01-26T10:53:53Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2021-01-21T18:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179e8e47c02a1950f1c556f2b854bdb2259078fb'/>
<id>urn:sha1:179e8e47c02a1950f1c556f2b854bdb2259078fb</id>
<content type='text'>
The recent commit to fix a memory leak introduced an inadvertant NULL
pointer dereference. The `wacom_wac-&gt;pen_fifo` variable was never
intialized, resuling in a crash whenever functions tried to use it.
Since the FIFO is only used by AES pens (to buffer events from pen
proximity until the hardware reports the pen serial number) this would
have been easily overlooked without testing an AES device.

This patch converts `wacom_wac-&gt;pen_fifo` over to a pointer (since the
call to `devres_alloc` allocates memory for us) and ensures that we assign
it to point to the allocated and initalized `pen_fifo` before the function
returns.

Link: https://github.com/linuxwacom/input-wacom/issues/230
Fixes: 37309f47e2f5 ("HID: wacom: Fix memory leakage caused by kfifo_alloc")
CC: stable@vger.kernel.org # v4.19+
Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Tested-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Fix memory leakage caused by kfifo_alloc</title>
<updated>2020-12-22T09:26:54Z</updated>
<author>
<name>Ping Cheng</name>
</author>
<published>2020-12-10T04:52:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37309f47e2f5674f3e86cb765312ace42cfcedf5'/>
<id>urn:sha1:37309f47e2f5674f3e86cb765312ace42cfcedf5</id>
<content type='text'>
As reported by syzbot below, kfifo_alloc'd memory would not be freed
if a non-zero return value is triggered in wacom_probe. This patch
creates and uses devm_kfifo_alloc to allocate and free itself.

BUG: memory leak
unreferenced object 0xffff88810dc44a00 (size 512):
  comm "kworker/1:2", pid 3674, jiffies 4294943617 (age 14.100s)
  hex dump (first 32 bytes):
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
   [&lt;0000000023e1afac&gt;] kmalloc_array include/linux/slab.h:592 [inline]
   [&lt;0000000023e1afac&gt;] __kfifo_alloc+0xad/0x100 lib/kfifo.c:43
   [&lt;00000000c477f737&gt;] wacom_probe+0x1a1/0x3b0 drivers/hid/wacom_sys.c:2727
   [&lt;00000000b3109aca&gt;] hid_device_probe+0x16b/0x210 drivers/hid/hid-core.c:2281
   [&lt;00000000aff7c640&gt;] really_probe+0x159/0x480 drivers/base/dd.c:554
   [&lt;00000000778d0bc3&gt;] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
   [&lt;000000005108dbb5&gt;] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
   [&lt;00000000efb7c59e&gt;] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
   [&lt;0000000024ab1590&gt;] __device_attach+0x122/0x250 drivers/base/dd.c:912
   [&lt;000000004c7ac048&gt;] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
   [&lt;00000000b93050a3&gt;] device_add+0x5ac/0xc30 drivers/base/core.c:2936
   [&lt;00000000e5b46ea5&gt;] hid_add_device+0x151/0x390 drivers/hid/hid-core.c:2437
   [&lt;00000000c6add147&gt;] usbhid_probe+0x412/0x560 drivers/hid/usbhid/hid-core.c:1407
   [&lt;00000000c33acdb4&gt;] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
   [&lt;00000000aff7c640&gt;] really_probe+0x159/0x480 drivers/base/dd.c:554
   [&lt;00000000778d0bc3&gt;] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
   [&lt;000000005108dbb5&gt;] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844

https://syzkaller.appspot.com/bug?extid=5b49c9695968d7250a26

Reported-by: syzbot+5b49c9695968d7250a26@syzkaller.appspotmail.com
Signed-off-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Constify attribute_groups</title>
<updated>2020-11-25T13:17:22Z</updated>
<author>
<name>Rikard Falkeborn</name>
</author>
<published>2020-11-24T23:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a6a35a9ecddb2b1d58f4948f471b3be8c506640'/>
<id>urn:sha1:2a6a35a9ecddb2b1d58f4948f471b3be8c506640</id>
<content type='text'>
These are never modified, so make them const to allow the compiler to put
them in read-only memory. It also allows the compiler to shrink the
resulting module with ~900 bytes, test-built with gcc 10.2 on x86_64.

   text    data     bss     dec     hex filename
 204377   42832     576  247785   3c7e9 drivers/hid/wacom_old.ko
 204240   42064     576  246880   3c460 drivers/hid/wacom_new.ko

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Read HID_DG_CONTACTMAX directly for non-generic devices</title>
<updated>2020-04-03T10:10:22Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2020-04-01T21:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=778fbf4179991e7652e97d7f1ca1f657ef828422'/>
<id>urn:sha1:778fbf4179991e7652e97d7f1ca1f657ef828422</id>
<content type='text'>
We've recently switched from extracting the value of HID_DG_CONTACTMAX
at a fixed offset (which may not be correct for all tablets) to
injecting the report into the driver for the generic codepath to handle.
Unfortunately, this change was made for *all* tablets, even those which
aren't generic. Because `wacom_wac_report` ignores reports from non-
generic devices, the contact count never gets initialized. Ultimately
this results in the touch device itself failing to probe, and thus the
loss of touch input.

This commit adds back the fixed-offset extraction for non-generic devices.

Link: https://github.com/linuxwacom/input-wacom/issues/155
Fixes: 184eccd40389 ("HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report")
Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
CC: stable@vger.kernel.org # 5.3+
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: wacom: do not call hid_set_drvdata(hdev, NULL)</title>
<updated>2019-08-22T15:08:09Z</updated>
<author>
<name>Benjamin Tissoires</name>
</author>
<published>2019-08-12T16:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=362c571b92e2fa734c1f2c1e303d1dc27f12ec95'/>
<id>urn:sha1:362c571b92e2fa734c1f2c1e303d1dc27f12ec95</id>
<content type='text'>
This is a common pattern in the HID drivers to reset the drvdata.
However, this is actually already handled by driver core, so there
is no need to do it manually.

Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Fix several minor compiler warnings</title>
<updated>2019-08-20T14:57:31Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2019-08-16T18:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=073b50bccbbf99a3b79a1913604c656d0e1a56c9'/>
<id>urn:sha1:073b50bccbbf99a3b79a1913604c656d0e1a56c9</id>
<content type='text'>
Addresses a few issues that were noticed when compiling with non-default
warnings enabled. The trimmed-down warnings in the order they are fixed
below are:

* declaration of 'size' shadows a parameter

* '%s' directive output may be truncated writing up to 5 bytes into a
  region of size between 1 and 64

* pointer targets in initialization of 'char *' from 'unsigned char *'
  differ in signedness

* left shift of negative value

Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech' and 'for-5.3/wacom' into for-linus</title>
<updated>2019-07-09T23:39:57Z</updated>
<author>
<name>Jiri Kosina</name>
</author>
<published>2019-07-09T23:39:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74acee309fb2a434dce215d44014e6f8e06975ae'/>
<id>urn:sha1:74acee309fb2a434dce215d44014e6f8e06975ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report</title>
<updated>2019-06-13T14:48:49Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2019-06-12T21:19:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=184eccd40389df29abefab88092c4ff33191fd0c'/>
<id>urn:sha1:184eccd40389df29abefab88092c4ff33191fd0c</id>
<content type='text'>
In the generic code path, HID_DG_CONTACTMAX was previously
only read from the second byte of report 0x23.

Another report (0x82) has the HID_DG_CONTACTMAX in the
higher nibble of the third byte. We should support reading the
value of HID_DG_CONTACTMAX no matter what report we are reading
or which position that value is in.

To do this we submit the feature report as a event report
using hid_report_raw_event(). Our modified finger event path
records the value of HID_DG_CONTACTMAX when it sees that usage.

Fixes: 8ffffd5212846 ("HID: wacom: fix timeout on probe for some wacoms")
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
