mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Paul Moore <paul@paul-moore.com>, peter.enderborg@sony.com
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	James Morris <jmorris@namei.org>,
	danielj@mellanox.com, dledford@redhat.com, selinux@tycho.nsa.gov,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, serge@hallyn.com
Subject: Re: [PATCH 03/13] selinux: Cleanup printk logging in policydb
Date: Tue, 19 Jun 2018 09:45:39 -0700	[thread overview]
Message-ID: <e66cad5399b741b8d5c06c8ea772c8b84caf1150.camel@perches.com> (raw)
In-Reply-To: <CAHC9VhTULXGAjbRSeriXm6g=aQbaG6XcfXtROVoJr632yis=Gw@mail.gmail.com>

On Tue, 2018-06-19 at 12:41 -0400, Paul Moore wrote:
> On Tue, Jun 12, 2018 at 4:09 AM Peter Enderborg
> <peter.enderborg@sony.com> wrote:
> > 
> > Replace printk with pr_* to avoid checkpatch warnings and
> > replace KERN_CONT with 2 longer prints.
> > 
> > Signed-off-by: Peter Enderborg <peter.enderborg@sony.com>
> > ---
> >  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


  reply	other threads:[~2018-06-19 16:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  8:08 [PATCH 00/13 selinux-next] selinux: Cleanup printk logging Peter Enderborg
2018-06-12  8:09 ` [PATCH 01/13] selinux: Cleanup printk logging in conditional Peter Enderborg
2018-06-12 14:38   ` Joe Perches
2018-06-13  6:23     ` peter enderborg
2018-06-13 17:38       ` J Freyensee
2018-06-19 15:46       ` Paul Moore
2018-06-12  8:09 ` [PATCH 02/13] selinux: Cleanup printk logging in ebitmap Peter Enderborg
2018-06-19 15:49   ` Paul Moore
2018-06-12  8:09 ` [PATCH 03/13] selinux: Cleanup printk logging in policydb Peter Enderborg
2018-06-19 16:41   ` Paul Moore
2018-06-19 16:45     ` Joe Perches [this message]
2018-06-19 16:51       ` Paul Moore
2018-06-12  8:09 ` [PATCH 04/13] selinux: Cleanup printk logging in hooks Peter Enderborg
2018-06-19 16:44   ` Paul Moore
2018-06-12  8:09 ` [PATCH 05/13] selinux: Cleanup printk logging in avtab Peter Enderborg
2018-06-19 17:03   ` Paul Moore
2018-06-12  8:09 ` [PATCH 06/13] selinux: Cleanup printk logging in services Peter Enderborg
2018-06-19 17:13   ` Paul Moore
2018-06-12  8:09 ` [PATCH 07/13] selinux: Cleanup printk logging in selinuxfs Peter Enderborg
2018-06-19 17:15   ` Paul Moore
2018-06-12  8:09 ` [PATCH 08/13] selinux: Cleanup printk logging in netlink Peter Enderborg
2018-06-19 17:34   ` Paul Moore
2018-06-12  8:09 ` [PATCH 09/13] selinux: Cleanup printk logging in sidtab Peter Enderborg
2018-06-19 17:39   ` Paul Moore
2018-06-12  8:09 ` [PATCH 10/13] selinux: Cleanup printk logging in netport Peter Enderborg
2018-06-19 17:44   ` Paul Moore
2018-06-12  8:09 ` [PATCH 11/13] selinux: Cleanup printk logging in netif Peter Enderborg
2018-06-19 17:46   ` Paul Moore
2018-06-12  8:09 ` [PATCH 12/13] selinux: Cleanup printk logging in avc Peter Enderborg
2018-06-19 17:48   ` Paul Moore
2018-06-12  8:09 ` [PATCH 13/13] selinux: Cleanup printk logging in netnode Peter Enderborg
2018-06-19 17:50   ` Paul Moore

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=e66cad5399b741b8d5c06c8ea772c8b84caf1150.camel@perches.com \
    --to=joe@perches.com \
    --cc=danielj@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=peter.enderborg@sony.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®