From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751350AbdBKACg (ORCPT ); Fri, 10 Feb 2017 19:02:36 -0500 Received: from smtprelay0197.hostedemail.com ([216.40.44.197]:38253 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750940AbdBKACf (ORCPT ); Fri, 10 Feb 2017 19:02:35 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3865:3866:3867:3868:3870:3872:4250:4321:5007:7903:7904:10004:10400:10848:11026:11658:11914:12048:12438:12740:12760:12895:13069:13311:13357:13439:14659:21080:21324:21434:30054:30070:30091,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,LFtime:3,LUA_SUMMARY:none X-HE-Tag: maid23_2614ce5757732 X-Filterd-Recvd-Size: 1931 Message-ID: <1486771260.2192.39.camel@perches.com> Subject: Re: [PATCH] checkpatch: add warning on %pk instead of %pK usage From: Joe Perches To: "Roberts, William C" , "linux-kernel@vger.kernel.org" , "apw@canonical.com" , Andew Morton Cc: "keescook@chromium.org" , "kernel-hardening@lists.openwall.com" Date: Fri, 10 Feb 2017 16:01:00 -0800 In-Reply-To: <476DC76E7D1DF2438D32BFADF679FC562305DB6F@ORSMSX103.amr.corp.intel.com> References: <1486755469-21573-1-git-send-email-william.c.roberts@intel.com> <1486757549.2192.20.camel@perches.com> <476DC76E7D1DF2438D32BFADF679FC562305C559@ORSMSX103.amr.corp.intel.com> <476DC76E7D1DF2438D32BFADF679FC562305C5BA@ORSMSX103.amr.corp.intel.com> <1486766996.2192.30.camel@perches.com> <476DC76E7D1DF2438D32BFADF679FC562305DB6F@ORSMSX103.amr.corp.intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 On Fri, 2017-02-10 at 23:54 +0000, Roberts, William C wrote: > > The problem starts to get hairy when we think of how often folks roll their own > > logging macros (see some small sampling at the end). It's not just the "hairy" local macros. In its current form, checkpatch could not find uses like: netif_(x, y, z, "some string with %pk", args); and some_logging_function(arg, "string 1" CONSTANT "string 2", etc...) if string 2 or CONSTANT had the "%pk" use. and a bunch of other styles. This really needs to be verified by the compiler.