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]
Message-ID: <alpine.LNX.2.00.1204241430190.1856@pobox.suse.cz>
Date:	Tue, 24 Apr 2012 14:31:13 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Henrik Rydberg <rydberg@...omail.se>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] hid: Scan the device for group info before adding
 it

On Mon, 23 Apr 2012, Henrik Rydberg wrote:

> In order to allow the report descriptor to influence the hid device
> properties, one needs to parse the descriptor early, without reference
> to any driver. Scan the descriptor for group information during device
> add, before the device has been broadcast to userland. The device
> modalias will contain group information which can be used to
> differentiate between modules. For starters, just handle the generic
> group.
> 
> Signed-off-by: Henrik Rydberg <rydberg@...omail.se>
> ---
>  drivers/hid/hid-core.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/hid.h    |    5 ++++
>  2 files changed, 67 insertions(+)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index cfcb69e..f932cd5 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -658,6 +658,58 @@ static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item)
>  	return NULL;
>  }
>  
> +static void hid_scan_usage(struct hid_device *hid, u32 usage)
> +{
> +}
> +
> +/*
> + * Scan a report descriptor before the device is added to the bus.
> + * Sets device groups and other properties that determine what driver
> + * to load.
> + */
> +static int hid_scan_report(struct hid_device *hid)
> +{
> +	unsigned int page = 0, delim = 0;
> +	__u8 *start = hid->dev_rdesc;
> +	__u8 *end = start + hid->dev_rsize;

Where do these dev_rdesc and dev_rsize come from? Your patchset doesn't 
seem to be changing the corresponding struct device members (which are 
rdesc and rsize currently), right?

-- 
Jiri Kosina
SUSE Labs
--
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