<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/hid/hid-core.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-06-19T05:59:59Z</updated>
<entry>
<title>Revert "HID: Increase maximum report size allowed by hid_field_extract()"</title>
<updated>2019-06-19T05:59:59Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2019-06-05T12:44:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1af738ad19a722cceb00051742a49eb59ed2328d'/>
<id>urn:sha1:1af738ad19a722cceb00051742a49eb59ed2328d</id>
<content type='text'>
commit 15fc1b5c86128f91c8c6699c3b0d9615740b13f1 upstream.

This reverts commit 94a9992f7dbdfb28976b565af220e0c4a117144a.

The commit allows for more than 32 bits in hid_field_extract(),
but the return value is a 32 bits int.
So basically what this commit is doing is just silencing those
legitimate errors.

Revert to a previous situation in the hope that a proper
fix will be impletemented.

Fixes: 94a9992f7dbd ("HID: Increase maximum report size allowed by hid_field_extract()")
Cc: stable@vger.kernel.org # v5.1
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: input: make sure the wheel high resolution multiplier is set</title>
<updated>2019-06-19T05:59:59Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2019-04-03T14:20:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=76f693f078d2e77ab85737d4d5ac07f041578d1f'/>
<id>urn:sha1:76f693f078d2e77ab85737d4d5ac07f041578d1f</id>
<content type='text'>
commit d43c17ead879ba7c076dc2f5fd80cd76047c9ff4 upstream.

Some old mice have a tendency to not accept the high resolution multiplier.
They reply with a -EPIPE which was previously ignored.

Force the call to resolution multiplier to be synchronous and actually
check for the answer. If this fails, consider the mouse like a normal one.

Fixes: 2dc702c991e377 ("HID: input: use the Resolution Multiplier for
       high-resolution scrolling")
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1700071
Reported-and-tested-by: James Feeney &lt;james@nurealm.net&gt;
Cc: stable@vger.kernel.org  # v5.0+
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: core: move Usage Page concatenation to Main item</title>
<updated>2019-05-31T13:43:43Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2019-03-27T10:18:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a30cdaf1eda802f6f7ef66fe7f33c21071d23b7a'/>
<id>urn:sha1:a30cdaf1eda802f6f7ef66fe7f33c21071d23b7a</id>
<content type='text'>
[ Upstream commit 58e75155009cc800005629955d3482f36a1e0eec ]

As seen on some USB wireless keyboards manufactured by Primax, the HID
parser was using some assumptions that are not always true. In this case
it's s the fact that, inside the scope of a main item, an Usage Page
will always precede an Usage.

The spec is not pretty clear as 6.2.2.7 states "Any usage that follows
is interpreted as a Usage ID and concatenated with the Usage Page".
While 6.2.2.8 states "When the parser encounters a main item it
concatenates the last declared Usage Page with a Usage to form a
complete usage value." Being somewhat contradictory it was decided to
match Window's implementation, which follows 6.2.2.8.

In summary, the patch moves the Usage Page concatenation from the local
item parsing function to the main item parsing function.

Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Reviewed-by: Terry Junge &lt;terry.junge@poly.com&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: Increase maximum report size allowed by hid_field_extract()</title>
<updated>2019-03-18T13:48:17Z</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2019-03-08T05:11:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94a9992f7dbdfb28976b565af220e0c4a117144a'/>
<id>urn:sha1:94a9992f7dbdfb28976b565af220e0c4a117144a</id>
<content type='text'>
Commit 71f6fa90a353 ("HID: increase maximum global item tag report size
to 256") increases the max report size from 128 to 256.

We also need to update the report size in hid_field_extract() otherwise
it complains and truncates now valid report size:
[ 406.165461] hid-sensor-hub 001F:8086:22D8.0002: hid_field_extract() called with n (192) &gt; 32! (kworker/5:1)

BugLink: https://bugs.launchpad.net/bugs/1818547
Fixes: 71f6fa90a353 ("HID: increase maximum global item tag report size to 256")
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: core: simplify active collection tracking</title>
<updated>2019-01-16T13:29:48Z</updated>
<author>
<name>Philipp Zabel</name>
<email>philipp.zabel@gmail.com</email>
</author>
<published>2019-01-14T07:19:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1950f462916edc9581168ca8d5882a8101e8bbcf'/>
<id>urn:sha1:1950f462916edc9581168ca8d5882a8101e8bbcf</id>
<content type='text'>
Manually tracking an active collection to set collection parents is not
necessary, we just have to look one step back into the collection stack
to find the correct parent.

Signed-off-by: Philipp Zabel &lt;philipp.zabel@gmail.com&gt;
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: core: replace the collection tree pointers with indices</title>
<updated>2019-01-10T06:08:18Z</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2019-01-09T03:50:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ee46967fc6e74d412fe1ec15f77fdb8624bde2b0'/>
<id>urn:sha1:ee46967fc6e74d412fe1ec15f77fdb8624bde2b0</id>
<content type='text'>
Previously, the pointer to the parent collection was stored. If a device
exceeds 16 collections (HID_DEFAULT_NUM_COLLECTIONS), the array to store
the collections is reallocated, the pointer to the parent collection becomes
invalid.

Replace the pointers with an index-based lookup into the collections array.

Fixes: c53431eb696f3c ("HID: core: store the collections as a basic tree")
Reported-by: Pandruvada, Srinivas &lt;srinivas.pandruvada@intel.com&gt;
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Tested-by: Kyle Pelton &lt;kyle.d.pelton@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: core: process the Resolution Multiplier</title>
<updated>2018-12-07T15:27:13Z</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2018-12-05T00:42:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5a4abb36f312cf83206b1b7d1308ba47cba0b3cc'/>
<id>urn:sha1:5a4abb36f312cf83206b1b7d1308ba47cba0b3cc</id>
<content type='text'>
The Resolution Multiplier is a feature report that modifies the value of
Usages within the same Logical Collection. If the multiplier is set to
anything but 1, the hardware reports (value * multiplier) for the same amount
of physical movement, i.e. the value we receive in the kernel is
pre-multiplied.

The hardware may either send a single (value * multiplier), or by sending
multiplier as many reports with the same value, or a combination of these two
options. For example, when the Microsoft Sculpt Ergonomic mouse Resolution
Multiplier is set to 12, the Wheel sends out 12 for every detent but AC Pan
sends out a value of 3 at 4 times the frequency.

The effective multiplier is based on the physical min/max of the multiplier
field, a logical min/max of [0,1] with a physical min/max of [1,8] means the
multiplier is either 1 or 8.

The Resolution Multiplier was introduced for high-resolution scrolling in
Windows Vista and is commonly used on Microsoft mice.

The recommendation for the Resolution Multiplier is to default to 1 for
backwards compatibility. This patch adds an arbitrary upper limit at 255. The
only known use case for the Resolution Multiplier is for scroll wheels where the
multiplier has to be a fraction of 120 to work with Windows.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Verified-by: Harry Cutts &lt;hcutts@chromium.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: core: store the collections as a basic tree</title>
<updated>2018-12-07T15:27:12Z</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2018-12-05T00:42:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c53431eb696f3c64c12c00afb81048af54b61532'/>
<id>urn:sha1:c53431eb696f3c64c12c00afb81048af54b61532</id>
<content type='text'>
For each collection parsed, store a pointer to the parent collection
(if any). This makes it a lot easier to look up which collection(s)
any given item is part of

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Verified-by: Harry Cutts &lt;hcutts@chromium.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-4.20/core' into for-linus</title>
<updated>2018-10-23T11:17:27Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2018-10-23T11:17:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d93af50ed68c0f079fa10491c6bd56daf74d601b'/>
<id>urn:sha1:d93af50ed68c0f079fa10491c6bd56daf74d601b</id>
<content type='text'>
Fixes and new features for driver core. Highlights:

- maximum global item tag report size gets increased to 256
- improved INPUT_PROP reporting for Digitizer devices
</content>
</entry>
<entry>
<title>HID: core: fix NULL pointer dereference</title>
<updated>2018-09-05T08:08:07Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-29T15:22:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b034ed50a2bb517c4b76e84f7723cb6bf60a4edd'/>
<id>urn:sha1:b034ed50a2bb517c4b76e84f7723cb6bf60a4edd</id>
<content type='text'>
There is a NULL pointer dereference in case memory resources
for *parse* are not successfully allocated.

Fix this by adding a new goto label and make the execution
path jump to it in case vzalloc() fails.

Addresses-Coverity-ID: 1473081 ("Dereference after null check")
Fixes: b2dd9f2e5a8a ("HID: core: fix memory leak on probe")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
