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-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1409232013320.2145@localhost.localdomain>
Date:	Tue, 23 Sep 2014 22:28:49 +0000 (UTC)
From:	Scot Doyle <lkml14@...tdoyle.com>
To:	Alan Stern <stern@...land.harvard.edu>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
	Dan Williams <dan.j.williams@...el.com>
cc:	Daniel Mack <daniel@...aq.de>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [RFC PATCH] usb: core: log more general message on malformed LANGID
 descriptor

I'd like to change this error message:
[    3.325837] usb 1-4: string descriptor 0 malformed (err = -61), defaulting to 0x0409

into an error message followed by a debug message:
[    3.324726] usb 1-4: malformed string descriptor; unknown language, defaulting to English
[    3.327514] usb 1-4: string descriptor 0 malformed (err = -61), defaulting to 0x0409

in order to communicate more information from the log itself. Are there 
any problems with this approach? Would it be better to put all the 
information on a single line? Something else?


---
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 0c8a7fc..c29eb37 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -770,6 +770,8 @@ static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf)
 		dev->string_langid = 0x0409;
 		dev->have_langid = 1;
 		dev_err(&dev->dev,
+			"malformed string descriptor; unknown language, defaulting to English");
+		dev_dbg(&dev->dev,
 			"string descriptor 0 malformed (err = %d), "
 			"defaulting to 0x%04x\n",
 				err, dev->string_langid);
--
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