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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170122175557.29008-1-marcos.souza.org@gmail.com>
Date:   Sun, 22 Jan 2017 15:55:19 -0200
From:   Marcos Paulo de Souza <marcos.souza.org@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Marcos Paulo de Souza <marcos.souza.org@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH -v2] Input: i8042: Add dbg msg when a command can't write its parameter

This can happen in cases like bug #102951[1], so add a proper debug msg
as done in wait_read. Also, change wait_read debug message to differ from
wait_write.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=102951

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@...il.com>
---
Changes from v1:
 * use dbg instead of pr_warn

 drivers/input/serio/i8042.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 62685a7..cba6831 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -312,8 +312,10 @@ static int __i8042_command(unsigned char *param, int command)
 
 	for (i = 0; i < ((command >> 12) & 0xf); i++) {
 		error = i8042_wait_write();
-		if (error)
+		if (error) {
+			dbg("     -- i8042 (timeout wait_write)\n");
 			return error;
+		}
 		dbg("%02x -> i8042 (parameter)\n", param[i]);
 		i8042_write_data(param[i]);
 	}
@@ -321,7 +323,7 @@ static int __i8042_command(unsigned char *param, int command)
 	for (i = 0; i < ((command >> 8) & 0xf); i++) {
 		error = i8042_wait_read();
 		if (error) {
-			dbg("     -- i8042 (timeout)\n");
+			dbg("     -- i8042 (timeout wait_read)\n");
 			return error;
 		}
 
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ