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: <20080629225423.A23524@ward.six>
Date:	Sun, 29 Jun 2008 22:54:23 +0600
From:	Denis Zaitceff <zaitceff@...il.com>
To:	vojtech@...e.cz, dmitry.torokhov@...il.com
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] atkbd.c: make the unknown key warnings controllable thru a config option

The patch allows to configure off the logging of ATKBD_KEY_UNKNOWN
events.  This logging can be healthy, but usually it just pollutes the
kernel log.  And this logging may be _very_ massive.

Very probably that other (than atkbd) keyboard drivers may win from
the similar patches.

Please apply this patch.


--- drivers/input/keyboard/Kconfig
+++ drivers/input/keyboard/Kconfig
@@ -12,6 +12,15 @@ menuconfig INPUT_KEYBOARD
 
 if INPUT_KEYBOARD
 
+config KEYBOARD_VERBOSE_KEY_UNKNOWN
+	bool "Report unknown keys"
+	default n
+	help
+	  If Y, each press and release of any key unknown to the keyboard driver
+	  will be logged at the KERN_WARNING level.  This is really good if you
+	  want to study your keyboard, but may really flood your logs.
+	  Be warned!
+
 config KEYBOARD_ATKBD
 	tristate "AT keyboard" if EMBEDDED || !X86_PC
 	default y
--- drivers/input/keyboard/atkbd.c
+++ drivers/input/keyboard/atkbd.c
@@ -442,6 +442,7 @@ static irqreturn_t atkbd_interrupt(struc
 		case ATKBD_KEY_NULL:
 			break;
 		case ATKBD_KEY_UNKNOWN:
+#ifdef KEYBOARD_VERBOSE_KEY_UNKNOWN
 			printk(KERN_WARNING
 			       "atkbd.c: Unknown key %s (%s set %d, code %#x on %s).\n",
 			       atkbd->release ? "released" : "pressed",
@@ -450,6 +451,7 @@ static irqreturn_t atkbd_interrupt(struc
 			printk(KERN_WARNING
 			       "atkbd.c: Use 'setkeycodes %s%02x <keycode>' to make it known.\n",
 			       code & 0x80 ? "e0" : "", code & 0x7f);
+#endif
 			input_sync(dev);
 			break;
 		case ATKBD_SCR_1:
--
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