linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Hans de Goede <hdegoede@redhat.com>, Julian Sax <jsbc@gmx.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] HID fixes
Date: Wed, 20 Jun 2018 09:35:47 +0200	[thread overview]
Message-ID: <CAO-hwJLkOx-12HAG3YEEFjOsiQScSgetVoF6gi+KSCpXyGXeGw@mail.gmail.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.1806200913420.6203@cbobk.fhfr.pm>

On Wed, Jun 20, 2018 at 9:15 AM, Jiri Kosina <jikos@kernel.org> wrote:
> On Wed, 20 Jun 2018, Linus Torvalds wrote:
>
>> But what is the *source* of this binary crud?
>>
>> Because no way in hell do we take binary crud from random places, and
>> then add it to the kernel.
>>
>> NOT EVEN IF IT WENT THROUGH SOME "hidrd-convert" PHASE!
>>
>> And yes, now that I google for that hidrd-convert pattern, I see that
>> we already have other broken chunks like this.
>>
>> Not ok. At least some of them seem to mention where the data comes from,
>> eg
>>
>>    "This is the original report descriptor as reported by lsusb -vd 046d:c294"
>>
>> but this one has no such information.
>>
>> So guys, you need to think about where things come from, and document
>> how some random garbage came to be. Not just add it to the kernel.
>
> Well, at least for the ones I've done myself in the past, those are
> hand-written from scratch.
>
> It's not really a firmware / code, it's just a description of the data in
> the reports, so that HID parser can interpret it properly.
>

In case it matters, I have an open-source python script that parses
those blobs and output the same level of human description here:
https://gitlab.freedesktop.org/libevdev/hid-tools/ (the script
parse_rdesc.py).

As Jiri said, this is all standardized and documented in the HID
protocol[1], and this 'just' describes the data that will be sent over
the transport layer.

In this particular case, the descriptors were extracted from the
Windows driver, not by looking at the binaries, but by looking at the
data that was transmitted from the "device". The thing is the data is
not stored on the device chip itself but on a third party driver from
the vendor. However, from a windows point of view, the third party
driver intercepts the I2C commands and supply the information when
needed. So it is as if the device answered. Blame the vendor here that
decided to reduce the costs and save a few KB on the chip :/

Cheers,
Benjamin

[1] http://www.usb.org/developers/hidpage/HID1_11.pdf

  reply	other threads:[~2018-06-20  9:10 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 12:00 [GIT PULL] HID fixes Jiri Kosina
2018-06-20  1:51 ` Linus Torvalds
2018-06-20  4:19   ` Jiri Kosina
2018-06-20  7:06     ` Hans de Goede
2018-06-20  7:12       ` Linus Torvalds
2018-06-20  7:15         ` Jiri Kosina
2018-06-20  7:35           ` Benjamin Tissoires [this message]
2018-06-20  7:37 ` [GIT PULL v2] " Jiri Kosina
  -- strict thread matches above, loose matches on Subject: below --
2024-02-15 12:38 [GIT PULL] " Jiri Kosina
2024-02-15 19:50 ` pr-tracker-bot
2023-12-12 22:51 Jiri Kosina
2023-12-13  1:21 ` pr-tracker-bot
2023-11-23 19:22 Jiri Kosina
2023-11-24  1:51 ` pr-tracker-bot
2023-10-11 12:00 Benjamin Tissoires
2023-10-11 20:58 ` pr-tracker-bot
2023-10-05 20:41 Jiri Kosina
2023-10-06  3:50 ` pr-tracker-bot
2023-07-11 13:59 Benjamin Tissoires
2023-07-12 23:28 ` pr-tracker-bot
2023-06-01 10:27 Jiri Kosina
2023-06-01 21:15 ` pr-tracker-bot
2023-04-12 22:03 Jiri Kosina
2023-04-13  0:44 ` pr-tracker-bot
2023-03-09 15:07 Benjamin Tissoires
2023-03-09 19:07 ` pr-tracker-bot
2023-02-09 14:31 Benjamin Tissoires
2023-02-09 18:10 ` pr-tracker-bot
2023-01-18 20:17 Jiri Kosina
2023-01-18 22:47 ` pr-tracker-bot
2022-12-21 15:18 Benjamin Tissoires
2022-12-21 17:53 ` pr-tracker-bot
2022-11-11 10:04 Jiri Kosina
2022-11-11 18:03 ` pr-tracker-bot
2022-10-21 12:17 Benjamin Tissoires
2022-10-22  1:28 ` pr-tracker-bot
2022-08-31 10:54 Jiri Kosina
2022-08-31 17:20 ` pr-tracker-bot
2022-03-09 10:42 Jiri Kosina
2022-03-09 22:16 ` pr-tracker-bot
2022-02-15 15:35 Jiri Kosina
2022-02-15 19:19 ` pr-tracker-bot
2022-01-21 14:17 Jiri Kosina
2022-01-21 14:27 ` pr-tracker-bot
2021-12-21 14:40 Jiri Kosina
2021-12-21 17:39 ` pr-tracker-bot
2021-12-09 10:15 Jiri Kosina
2021-12-09 19:35 ` pr-tracker-bot
2021-11-24  7:10 Jiri Kosina
2021-11-24 18:31 ` pr-tracker-bot
2021-09-27 13:54 Jiri Kosina
2021-09-27 17:25 ` pr-tracker-bot
2021-07-30 12:06 Jiri Kosina
2021-07-30 18:11 ` pr-tracker-bot
2021-06-01 21:58 Jiri Kosina
2021-06-02  3:58 ` pr-tracker-bot
2021-04-15 13:51 Jiri Kosina
2021-04-15 18:15 ` pr-tracker-bot
2021-01-28  8:38 Jiri Kosina
2021-01-28 18:16 ` pr-tracker-bot
2021-01-14 12:33 Jiri Kosina
2021-01-14 21:55 ` pr-tracker-bot
2020-11-22 21:18 Jiri Kosina
2020-11-22 22:40 ` pr-tracker-bot
2020-09-02 18:58 Jiri Kosina
2020-09-02 20:08 ` pr-tracker-bot
2020-08-25  8:14 Jiri Kosina
2020-08-25 19:16 ` pr-tracker-bot
2020-07-17 12:01 Jiri Kosina
2020-07-17 17:40 ` pr-tracker-bot
2020-03-17 13:41 Jiri Kosina
2020-03-17 17:10 ` pr-tracker-bot
2020-02-27 14:46 Jiri Kosina
2020-02-27 19:40 ` pr-tracker-bot
2020-01-09 14:23 Jiri Kosina
2020-01-09 19:14 ` Linus Torvalds
2020-01-09 19:25   ` Dmitry Torokhov
2020-01-09 19:37   ` Jiri Kosina
2020-01-09 20:38     ` Jiri Kosina
2020-01-09 23:36       ` Linus Torvalds
2020-01-09 23:41         ` Linus Torvalds
2020-01-10 14:31           ` Jiri Kosina
2020-01-09 19:15 ` pr-tracker-bot
2019-11-07 19:32 Jiri Kosina
2019-11-07 20:00 ` pr-tracker-bot
2019-08-20 12:53 Jiri Kosina
2019-08-20 18:55 ` pr-tracker-bot
2019-08-06 10:59 Jiri Kosina
2019-08-06 18:55 ` pr-tracker-bot
2019-06-27  9:37 Jiri Kosina
2019-06-28  0:45 ` pr-tracker-bot
2019-04-03 13:39 Jiri Kosina
2019-04-03 16:25 ` pr-tracker-bot
2019-01-22  9:46 Jiri Kosina
2019-01-22 18:55 ` pr-tracker-bot
2018-12-10 16:05 Jiri Kosina
2018-12-10 20:20 ` pr-tracker-bot
2018-11-24 20:19 Jiri Kosina
2018-11-24 23:15 ` pr-tracker-bot
2018-11-07 10:31 Jiri Kosina
2018-11-07 17:07 ` Linus Torvalds
2018-10-03  8:55 Jiri Kosina
2018-10-03 11:50 ` Greg Kroah-Hartman
2018-09-11  7:49 Jiri Kosina
2018-07-09 12:54 Jiri Kosina
2018-04-19  8:05 Jiri Kosina
2017-10-12 12:46 Jiri Kosina
2017-10-05  8:58 Jiri Kosina
2017-06-20  9:01 Jiri Kosina
2017-03-31  8:01 Jiri Kosina
2017-01-31 12:13 Jiri Kosina
2017-01-19 13:29 Jiri Kosina
2016-11-07 10:01 Jiri Kosina
2015-02-23 22:37 Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO-hwJLkOx-12HAG3YEEFjOsiQScSgetVoF6gi+KSCpXyGXeGw@mail.gmail.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jsbc@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).