Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbbFYUAW (ORCPT ); Thu, 25 Jun 2015 16:00:22 -0400 Received: from smtprelay0028.hostedemail.com ([216.40.44.28]:48402 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751469AbbFYUAP (ORCPT ); Thu, 25 Jun 2015 16:00:15 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1256:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:2892:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3871:3872:3874:4250:4321:5007:6119:6261:7576:7903:10004:10400:10848:11026:11232:11473:11658:11914:12043:12517:12519:12740:13069:13311:13357:14196:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: laugh19_3c033503c440a X-Filterd-Recvd-Size: 2519 Message-ID: <1435262411.9377.42.camel@perches.com> Subject: Re: [PATCH] i8042: Add debug_kbd option From: Joe Perches To: cpaul@redhat.com Cc: Benjamin Tissoires , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Dmitry Torokhov , Hans de Goede Date: Thu, 25 Jun 2015 13:00:11 -0700 In-Reply-To: <1435260310-10074-1-git-send-email-cpaul@redhat.com> References: <1435260310-10074-1-git-send-email-cpaul@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1821 Lines: 48 On Thu, 2015-06-25 at 15:25 -0400, cpaul@redhat.com wrote: > From: Stephen Chandler Paul > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/