From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753182AbcF2Pml (ORCPT ); Wed, 29 Jun 2016 11:42:41 -0400 Received: from smtprelay0225.hostedemail.com ([216.40.44.225]:54341 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753059AbcF2Pmk (ORCPT ); Wed, 29 Jun 2016 11:42:40 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3871:3872:3873:3874:4321:5007:6261:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12043:12438:12517:12519:12555:12663:12740:13069:13161:13229:13311:13357:13439:14181:14659:14721:21080:21324,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:2,LUA_SUMMARY:none X-HE-Tag: story67_8b104e6d5be0d X-Filterd-Recvd-Size: 3053 Date: Wed, 29 Jun 2016 11:42:34 -0400 From: Steven Rostedt To: Jiri Olsa Cc: Rasmus Villemoes , Jiri Olsa , lkml , Frederic Weisbecker Subject: Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask Message-ID: <20160629114234.1523d7dd@gandalf.local.home> In-Reply-To: <20160629064348.GA12326@krava> References: <1467128075-10841-1-git-send-email-jolsa@kernel.org> <20160628122608.0ea291b2@gandalf.local.home> <878txpi066.fsf@rasmusvillemoes.dk> <20160628180647.1e90257e@gandalf.local.home> <20160629064348.GA12326@krava> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jun 2016 08:43:48 +0200 Jiri Olsa wrote: > > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > > index 94aa10ffe156..62693900cc4b 100644 > > --- a/include/linux/kernel.h > > +++ b/include/linux/kernel.h > > @@ -631,7 +631,24 @@ do { \ > > \ > > __trace_printk_check_format(fmt, ##args); \ > > \ > > - if (__builtin_constant_p(fmt)) \ > > + if (__builtin_constant_p(fmt) && \ > > + !__builtin_strstr(fmt, "%pF") && \ > > + !__builtin_strstr(fmt, "%pf") && \ > > + !__builtin_strstr(fmt, "%pR") && \ > > + !__builtin_strstr(fmt, "%pr") && \ > > + !__builtin_strstr(fmt, "%pb") && \ > > + !__builtin_strstr(fmt, "%pM") && \ > > + !__builtin_strstr(fmt, "%pI") && \ > > + !__builtin_strstr(fmt, "%pE") && \ > > + !__builtin_strstr(fmt, "%pU") && \ > > + !__builtin_strstr(fmt, "%pV") && \ > > + !__builtin_strstr(fmt, "%pN") && \ > > + !__builtin_strstr(fmt, "%pa") && \ > > + !__builtin_strstr(fmt, "%pd") && \ > > + !__builtin_strstr(fmt, "%pC") && \ > > + !__builtin_strstr(fmt, "%pD") && \ > > + !__builtin_strstr(fmt, "%pg") && \ > > + !__builtin_strstr(fmt, "%pG")) \ > > __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \ > > else \ > > __trace_printk(_THIS_IP_, fmt, ##args); \ > > is this one working? it seems better to me than adding new trace_printk_ptr The problem with this is that it would require a bunch more conditions as you see it would not have helped your own use case (requiring the *p) I'm actually looking into extending your patch to handle all cases that vbin_printf() is an issue. Thinking about it more, as vbin_printf() is a two part process, it should by default not depend on any dereferencing, as I can't think of any use case for it where it wouldn't be an issue. -- Steve