lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Apr 2007 18:47:19 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Li Yu <liyu@...ss.com.cn>, yanghong@...ss.com.cn,
	linux-usb-devel <linux-usb-devel@...ts.sourceforge.net>,
	hongzhiyi@...ss.com.cn, LKML <linux-kernel@...r.kernel.org>,
	Li Yu <raise.sail@...il.com>
Subject: Re: [linux-usb-devel] [RFC] HID bus design overview.

Hi Jiri,

> > I like this idea, but it might not solve the case where you have parts 
> > of the driver in kernel space and other parts in user space. For example 
> > the control of a LCD display on the keyboard. However in most cases 
> > registering drivers for a report id should be enough.
> 
> the specialized driver could hook on all reports of the device (as 
> discussed a few mails ago in this thread) and have the possibility to do 
> three different things with the obtained report:
> 
> - pass it back to generic hid driver for "standard" processing
> - process the report, and issue input_event() itself
> - pass it to hidraw and let userspace to consume it
> 
> This is going to work for the scenario you have described, right?

it will work. However I am not sure that is the best design. We need to
make one round-trip into an extra driver. We might gonna need these kind
of driver that hook in-between and does nasty things anyway, because of
broken HID devices.

The cleanest solution without a layer violation is that you can register
a driver for a specific VID/PID and then report id (one or more). All
reports with ids that we don't have a special driver for are handled by
the default HID->input driver or handed over to hidraw if not parseable.
The reports for ids with a special driver are handed over to the driver.

And for hidraw it would be nice if we can apply filters for specific
report ids to keep the round-trips and overhead at a minimum.

Regards

Marcel


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ