Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5400345imm; Tue, 19 Jun 2018 09:47:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIJ+eX2DtKpmxvsvUqNu62L8fXUN41lvc1VzMYrYr1Qga5IRpKeyM6s46duM0WI+E0BxCOm X-Received: by 2002:aa7:8298:: with SMTP id s24-v6mr18772460pfm.136.1529426821221; Tue, 19 Jun 2018 09:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529426821; cv=none; d=google.com; s=arc-20160816; b=dk2KjDajBLFxYqwEedFMb64yE4CNgyNq+PVXhczvv+LFa7kYCegdrusk6EsE05Ktuy Wzlxw9/s4guyZ9aqSL2yamDTHeVQuXGEEUHUKxEHJfV458YdNhRrIDVD2DfRVnKGf8ag UIg8qVdtCLeGY0nQ6msWlubRum2yHA84fQ0b1k3m4pdhOUmB9Hu6ckrJnG/jePfTnS1Y rBuyOqZjR0Znwa4X+mCmxWT1vUMrXrKvAqXh9dz4frrPfzsteaPCxFEpMCqsuS59j8Gk mhGhq52kKpIS9TATGLBbmen8mQfMSzcss07zqIr7ZyPOD5W8NqI6I6ppSrty8JVO8r81 65ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=pcJS04icBi0JGa/NKl3mtrGoyWhl0oYPThoPBXwE8+M=; b=BZjGl/6qbdsPU+N6zRWEchPjqATGJPqCjzsEtp+0M4WCZlkiAl2hNLiqkAwB1tDcVJ xKGyWhAZ7f1LLlhbOH5BPdf/GDsYbzSA1PTcn5YCP+v453PKNvd0cP+LUnX/PQfcn6Zm lEjum/SfDKGEYn+O+68yr03KFc+skNXlrrc4C0apT3Wrto/WsaLFO4Jh8jpDwRgW5ost s0CMAWs93PotpyEyjCYHm6SKlXXjMw8x6Vc8OujEPmmoK8gT1NvSa9/wWHLOo0WmU85i g9Zf/dRQvJHEjna7DClQmcYooSm1oh/a2BFBrIXMw+biTZEZ6qEhCTbaiUSiW+NOl6A6 zaXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23-v6si96997pfe.318.2018.06.19.09.46.47; Tue, 19 Jun 2018 09:47:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030252AbeFSQpq (ORCPT + 99 others); Tue, 19 Jun 2018 12:45:46 -0400 Received: from smtprelay0211.hostedemail.com ([216.40.44.211]:54303 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030242AbeFSQpo (ORCPT ); Tue, 19 Jun 2018 12:45:44 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 667BC18058ED1; Tue, 19 Jun 2018 16:45:43 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:69:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:2198:2199:2393:2553:2559:2562:2828:2894:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3873:3874:4321:4605:5007:8603:10004:10400:10848:11026:11232:11658:11914:12043:12291:12296:12683:12740:12760:12895:13095:13439:14110:14181:14659:14721:21080:21433:21627:30054:30075:30090:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:32,LUA_SUMMARY:none X-HE-Tag: crib39_6bd415231285a X-Filterd-Recvd-Size: 3371 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Tue, 19 Jun 2018 16:45:40 +0000 (UTC) Message-ID: Subject: Re: [PATCH 03/13] selinux: Cleanup printk logging in policydb From: Joe Perches To: Paul Moore , peter.enderborg@sony.com Cc: Stephen Smalley , Eric Paris , James Morris , danielj@mellanox.com, dledford@redhat.com, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, serge@hallyn.com Date: Tue, 19 Jun 2018 09:45:39 -0700 In-Reply-To: References: <20180612080912.7827-1-peter.enderborg@sony.com> <20180612080912.7827-4-peter.enderborg@sony.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-06-19 at 12:41 -0400, Paul Moore wrote: > On Tue, Jun 12, 2018 at 4:09 AM Peter Enderborg > wrote: > > > > Replace printk with pr_* to avoid checkpatch warnings and > > replace KERN_CONT with 2 longer prints. > > > > Signed-off-by: Peter Enderborg > > --- > > security/selinux/ss/policydb.c | 91 +++++++++++++++++++++--------------------- > > 1 file changed, 46 insertions(+), 45 deletions(-) > > Merged, thank you. While removing the separate KERN_CONT message > introduces some duplication, I think that's the right thing to do. > > > diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c [] > > @@ -504,7 +504,7 @@ static void hash_eval(struct hashtab *h, const char *hash_name) > > struct hashtab_info info; > > > > hashtab_stat(h, &info); > > - printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, " > > + pr_debug("SELinux: %s: %d entries and %d/%d buckets used, " > > "longest chain length %d\n", hash_name, h->nel, > > info.slots_used, h->size, info.max_chain_len); > > } > > @@ -533,15 +533,17 @@ static int policydb_index(struct policydb *p) > > { > > int i, rc; > > > > - printk(KERN_DEBUG "SELinux: %d users, %d roles, %d types, %d bools", > > - p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, p->p_bools.nprim); > > if (p->mls_enabled) > > - printk(KERN_CONT ", %d sens, %d cats", p->p_levels.nprim, > > - p->p_cats.nprim); > > - printk(KERN_CONT "\n"); > > + pr_debug("SELinux: %d users, %d roles, %d types, %d bools, %d sens, %d cats", > > + p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, > > + p->p_bools.nprim, p->p_levels.nprim, p->p_cats.nprim); > > + else > > + pr_debug("SELinux: %d users, %d roles, %d types, %d bools", > > + p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, > > + p->p_bools.nprim); This lost the terminating newline on each pr_debug