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: <Pine.LNX.4.44L0.1509232031080.22345-100000@netrider.rowland.org>
Date:	Wed, 23 Sep 2015 20:38:43 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Eric Curtin <ericcurtin17@...il.com>
cc:	USB list <linux-usb@...r.kernel.org>, <jikos@...nel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Problems with printk logs and my driver

On Thu, 24 Sep 2015, Eric Curtin wrote:

> Hi Guys,
> 
> Just wondering what I am doing wrong. I can't see my logs. I figured
> out what driver is used for my keyboard and started adding logging:
> 
> [curtine@...alhost ~]$ sudo lsusb -v | grep eyboard -B 13
> Bus 001 Device 003: ID 04ca:008d Lite-On Technology Corp.

...

> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
>     |__ Port 4: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
>     |__ Port 4: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
>     |__ Port 7: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
>     |__ Port 7: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
>     |__ Port 7: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M

...

> So, first I added a little logging and then some more, but I can't see
> any of it (see patch at bottom of email, I used KERN_EMERG, it's just
> temporary logging).
> 
> I'm think I'm doing most things right, this is how I compile my code I
> wrote a little script (I'm on fedora):

...

> I reboot, load new kernel, blah blah. When I type keys I don't see my
> logs in dmesg, I don't see them in /var/log/messages either, I don't
> see them in /home/curtine/log.log either when I do a:
> 
> sudo killall klogd
> sudo /sbin/klogd -f /home/curtine/log.log
> 
> What am I doing wrong here?

You made a very simple mistake.  See below.

> Also, as regards etiquette on these mailing lists, is it ok to
> regularly cc linux-kernel@...r.kernel.org?

It's okay.  But there's no need to do it if your topic is limited to a 
single subsystem.

> diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
> index 9a332e6..2038d94 100644
> --- a/drivers/hid/usbhid/usbkbd.c
> +++ b/drivers/hid/usbhid/usbkbd.c
> @@ -112,6 +112,7 @@ struct usb_kbd {
> 
>  static void usb_kbd_irq(struct urb *urb)
>  {
> +   printk(KERN_EMERG "usb_kbd_irq");
>     struct usb_kbd *kbd = urb->context;
>     int i;
> 
...

Your mistake was thinking that the driver for your keyboard is usbkbd.  
It isn't.  It's usbhid, as you can see in the "lsusb -t" output above.

Even though the source code for usbkbd is located in the usbhid 
directory, they are separate drivers.  Look at the Kconfig file in 
drivers/hid/usbhid and you'll see.

Alan Stern

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