Message ID | CAKsRvPPjk7RZanEwO3hVa+UZ9_zq6xWakOxckBfx-a+_bEgUtA@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [BUG,+] HID ELAN9038 probe fails with "report is too long" | expand |
i'm bumping this bug because i haven't heard anything from the maintainers for a week. there's been no change in the git either. what's going on guys? this is a tiny patch for a very simple bug. it should be a fast review and commit to the kernel tree. js On Sun, Jan 19, 2020 at 1:14 PM js <sym.i.nem@gmail.com> wrote: > > i posted this bug to bugzilla with the attached patch. > this email is to notify the maintainers. > https://bugzilla.kernel.org/show_bug.cgi?id=206259 > > thanks! > > js > ---- > > ELAN i2c digitizer on microsoft surface go fails to initialize and > device is non-functional > > initialization fails on 4.19.96: > ---- > [ 5.507245] hid-generic 0018:04F3:261A.0005: report is too long > [ 5.507256] hid-generic 0018:04F3:261A.0005: item 0 1 0 8 parsing failed > [ 5.507290] hid-generic: probe of 0018:04F3:261A.0005 failed with error -22 > [ 5.556409] hid-multitouch 0018:04F3:261A.0005: report is too long > [ 5.581641] hid-multitouch 0018:04F3:261A.0005: item 0 1 0 8 parsing failed > [ 5.618495] hid-multitouch: probe of 0018:04F3:261A.0005 failed > with error -22 > > initialization succeeds on 4.19.95: > ---- > [ 7.150887] hid-generic 0018:04F3:261A.0001: input,hidraw2: I2C HID > v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00 > [ 8.253077] input: ELAN9038:00 04F3:261A as > /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input20 > [ 8.253219] input: ELAN9038:00 04F3:261A Pen as > /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input23 > [ 8.253330] hid-multitouch 0018:04F3:261A.0001: input,hidraw0: I2C > HID v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00 > > problem seems to be due to this commit: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=31d06cc8e7caec36bedeb4f90444920431462f61
Hi, On Mon, Jan 27, 2020 at 9:41 PM js <sym.i.nem@gmail.com> wrote: > > i'm bumping this bug because i haven't heard anything from the > maintainers for a week. Apologies for the delay. I have been in a conference the past 2 weeks in Australia, so couldn't handle much of upstream. Furthermore, we are currently in the merge window, which means we should not push patches to linux-next unless they are absolutely needed. > there's been no change in the git either. > what's going on guys? this is a tiny patch for a very simple bug. > it should be a fast review and commit to the kernel tree. Nope, that is not that simple: - please submit your patches following https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n340 Our tools require the patches to not be attached in an email so we can process them - this patch affects the core of the HID subsystem, which means we should take extra care when dealing with it to not break other systems - this patch seems to paper over a security patch (8ec321e96e056de84022c032ffea253431a83c3c) by changing the return value from an error to "yeah, that's fine". So unless there is a proof that this is the correct way, it's going to be a nack from me until proven otherwise - this patch affects in the end hid-multitouch, and as mentioned in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-multitouch.c#n26 I'd like to have a reproducer in https://gitlab.freedesktop.org/libevdev/hid-tools so we do not break those devices in the future. So I understand the frustration of having a HW regression, but this patch is clearly not the correct solution given what I have here, so I can not push it right now. Cheers, Benjamin > > js > > On Sun, Jan 19, 2020 at 1:14 PM js <sym.i.nem@gmail.com> wrote: > > > > i posted this bug to bugzilla with the attached patch. > > this email is to notify the maintainers. > > https://bugzilla.kernel.org/show_bug.cgi?id=206259 > > > > thanks! > > > > js > > ---- > > > > ELAN i2c digitizer on microsoft surface go fails to initialize and > > device is non-functional > > > > initialization fails on 4.19.96: > > ---- > > [ 5.507245] hid-generic 0018:04F3:261A.0005: report is too long > > [ 5.507256] hid-generic 0018:04F3:261A.0005: item 0 1 0 8 parsing failed > > [ 5.507290] hid-generic: probe of 0018:04F3:261A.0005 failed with error -22 > > [ 5.556409] hid-multitouch 0018:04F3:261A.0005: report is too long > > [ 5.581641] hid-multitouch 0018:04F3:261A.0005: item 0 1 0 8 parsing failed > > [ 5.618495] hid-multitouch: probe of 0018:04F3:261A.0005 failed > > with error -22 > > > > initialization succeeds on 4.19.95: > > ---- > > [ 7.150887] hid-generic 0018:04F3:261A.0001: input,hidraw2: I2C HID > > v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00 > > [ 8.253077] input: ELAN9038:00 04F3:261A as > > /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input20 > > [ 8.253219] input: ELAN9038:00 04F3:261A Pen as > > /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input23 > > [ 8.253330] hid-multitouch 0018:04F3:261A.0001: input,hidraw0: I2C > > HID v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00 > > > > problem seems to be due to this commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=31d06cc8e7caec36bedeb4f90444920431462f61 >
diff -rupN linux-4.19.97/drivers/hid/hid-core.c linux-4.19.97-1/drivers/hid/hid-core.c --- linux-4.19.97/drivers/hid/hid-core.c 2020-01-17 18:47:17.000000000 +0000 +++ linux-4.19.97-1/drivers/hid/hid-core.c 2020-01-19 16:31:31.823005977 +0000 @@ -290,8 +290,11 @@ static int hid_add_field(struct hid_pars /* Total size check: Allow for possible report index byte */ if (report->size > (HID_MAX_BUFFER_SIZE - 1) << 3) { - hid_err(parser->device, "report is too long\n"); - return -1; + hid_err(parser->device, + "report is too long: %d > %d\n", + report->size, + (HID_MAX_BUFFER_SIZE - 1) << 3); + return 0; } if (!parser->local.usage_index) /* Ignore padding fields */