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] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1208270807420.22447@pobox.suse.cz>
Date:	Mon, 27 Aug 2012 08:07:54 -0700 (PDT)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Henrik Rydberg <rydberg@...math.se>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Henrik Rydberg <rydberg@...omail.se>
Subject: Re: [PATCH] HID: hid-debug: Show rdesc for unclaimed devices

On Tue, 21 Aug 2012, Henrik Rydberg wrote:

> Since commit a7197c2e, the raw report descriptor is available also for
> unclaimed devices. This patchs make it show in the rdesc debugfs node.

Definitely nice to have. Applied, thanks Henrik.

> 
> Signed-off-by: Henrik Rydberg <rydberg@...omail.se>
> ---
>  drivers/hid/hid-debug.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index 01dd9a7..933fff0 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -911,15 +911,21 @@ static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
>  
>  }
>  
> -
>  static int hid_debug_rdesc_show(struct seq_file *f, void *p)
>  {
>  	struct hid_device *hdev = f->private;
> +	const __u8 *rdesc = hdev->rdesc;
> +	unsigned rsize = hdev->rsize;
>  	int i;
>  
> +	if (!rdesc) {
> +		rdesc = hdev->dev_rdesc;
> +		rsize = hdev->dev_rsize;
> +	}
> +
>  	/* dump HID report descriptor */
> -	for (i = 0; i < hdev->rsize; i++)
> -		seq_printf(f, "%02x ", hdev->rdesc[i]);
> +	for (i = 0; i < rsize; i++)
> +		seq_printf(f, "%02x ", rdesc[i]);
>  	seq_printf(f, "\n\n");
>  
>  	/* dump parsed data and input mappings */
> -- 
> 1.7.11.5
> 

-- 
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