From: Joe Perches <joe@perches.com>
To: cpaul@redhat.com
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH] i8042: Add debug_kbd option
Date: Thu, 25 Jun 2015 13:00:11 -0700 [thread overview]
Message-ID: <1435262411.9377.42.camel@perches.com> (raw)
In-Reply-To: <1435260310-10074-1-git-send-email-cpaul@redhat.com>
On Thu, 2015-06-25 at 15:25 -0400, cpaul@redhat.com wrote:
> From: Stephen Chandler Paul <cpaul@redhat.com>
>
> A big problem with the current i8042 debugging option is that it outputs
> data going to and from the keyboard by default. As a result, many dmesg
> logs uploaded by users will unintentionally contain sensitive information
> such as their password, as such it's probably a good idea not to output
> data coming from the keyboard unless specifically enabled by the user.
Seems sensible. Coupla trivial bits:
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
[]
> @@ -88,6 +88,23 @@ MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
> static bool i8042_debug;
> module_param_named(debug, i8042_debug, bool, 0600);
> MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off");
> +
> +static bool i8042_debug_kbd;
> +module_param_named(debug_kbd, i8042_debug_kbd, bool, 0600);
> +MODULE_PARM_DESC(i8042_kbd, "Turn i8042 kbd debugging output on or off");
It's unclear this depends on i8042_debug.
Maybe add something like " (enabling requires i8042_debug=1)"
> +#define str_dbg(str, data, format, args...) \
> + do { \
> + if (!i8042_debug) \
> + break; \
> + \
> + if (str & I8042_STR_AUXDATA || i8042_debug_kbd) \
> + dbg("%02x " format, data, ##args); \
> + else \
> + dbg("** " format, ##args); \
> + } while (0)
> +#else
> +#define str_dbg(str, data, format, args...) do { } while (0)
> #endif
This should probably go into i8042.h
where the dbg macro is #defined
next prev parent reply other threads:[~2015-06-25 20:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 19:25 [PATCH] i8042: Add debug_kbd option cpaul
2015-06-25 20:00 ` Joe Perches [this message]
2015-06-25 20:32 ` Dmitry Torokhov
2015-06-25 21:31 ` Stephen Chandler Paul
2015-06-25 21:35 ` Dmitry Torokhov
2015-06-25 22:12 ` Stephen Chandler Paul
2015-06-26 19:28 ` [PATCH v2] " cpaul
2015-06-26 22:28 ` [PATCH v3] " cpaul
2015-06-26 23:05 ` Dmitry Torokhov
2015-06-26 23:21 ` Stephen Chandler Paul
2015-06-26 23:24 ` Dmitry Torokhov
2015-06-27 0:24 ` [PATCH v4] " cpaul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435262411.9377.42.camel@perches.com \
--to=joe@perches.com \
--cc=benjamin.tissoires@redhat.com \
--cc=cpaul@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.