All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: james.l.morris@oracle.com, vlee@twopensource.com,
	linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
	trinity@vger.kernel.org, sds@tycho.nsa.gov
Subject: Re: [PATCH] selinux: convert WARN_ONCE() to printk_once() in selinux_nlmsg_perm()
Date: Wed, 12 Nov 2014 16:30:38 -0500	[thread overview]
Message-ID: <1709228.3j5ciILylX@sifl> (raw)
In-Reply-To: <20141112212515.GF28076@madcap2.tricolour.ca>

On Wednesday, November 12, 2014 04:25:15 PM Richard Guy Briggs wrote:
> On 14/11/12, Paul Moore wrote:
> > My apologies, I should have noticed this sooner, but printk_once() is
> > probably not a good choice here as only the first invalid netlink message
> > will be displayed.  This is fine if all the invalid netlink messages
> > happen the same, but that isn't likely to be the case.
> 
> This was the same situation with WARN_ONCE(), hence my comment about
> difficulty in debugging...

Unfortunately I didn't realize your point until now.

> > Richard, any objections if I convert the printk_once() to a printk(WARN)
> > and update the patch description accordingly?
> 
> Use pr_warn() instead...

Normally, yes, but the rest of the SELinux code uses printk(WARN) and I'm a 
stickler for consistency.

-- 
paul moore
security and virtualization @ redhat

WARNING: multiple messages have this Message-ID (diff)
From: Paul Moore <pmoore@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org,
	trinity@vger.kernel.org, sds@tycho.nsa.gov,
	vlee@twopensource.com, eparis@parisplace.org,
	james.l.morris@oracle.com, serge@hallyn.com
Subject: Re: [PATCH] selinux: convert WARN_ONCE() to printk_once() in selinux_nlmsg_perm()
Date: Wed, 12 Nov 2014 16:30:38 -0500	[thread overview]
Message-ID: <1709228.3j5ciILylX@sifl> (raw)
In-Reply-To: <20141112212515.GF28076@madcap2.tricolour.ca>

On Wednesday, November 12, 2014 04:25:15 PM Richard Guy Briggs wrote:
> On 14/11/12, Paul Moore wrote:
> > My apologies, I should have noticed this sooner, but printk_once() is
> > probably not a good choice here as only the first invalid netlink message
> > will be displayed.  This is fine if all the invalid netlink messages
> > happen the same, but that isn't likely to be the case.
> 
> This was the same situation with WARN_ONCE(), hence my comment about
> difficulty in debugging...

Unfortunately I didn't realize your point until now.

> > Richard, any objections if I convert the printk_once() to a printk(WARN)
> > and update the patch description accordingly?
> 
> Use pr_warn() instead...

Normally, yes, but the rest of the SELinux code uses printk(WARN) and I'm a 
stickler for consistency.

-- 
paul moore
security and virtualization @ redhat

  reply	other threads:[~2014-11-12 21:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 20:12 "selinux_nlmsg_perm: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=30" warning on Linux 3.18-rc3 Vinson Lee
2014-11-05 20:48 ` Paul Moore
2014-11-05 20:48   ` Paul Moore
2014-11-05 20:51   ` Stephen Smalley
2014-11-05 20:51     ` Stephen Smalley
2014-11-05 21:57     ` Paul Moore
2014-11-05 21:57       ` Paul Moore
2014-11-05 22:25       ` Richard Guy Briggs
2014-11-05 22:25         ` Richard Guy Briggs
2014-11-10 20:41         ` Paul Moore
2014-11-10 20:41           ` Paul Moore
2014-11-12 19:01           ` [PATCH] selinux: convert WARN_ONCE() to printk_once() in selinux_nlmsg_perm() Richard Guy Briggs
2014-11-12 19:01             ` Richard Guy Briggs
2014-11-12 21:21             ` Paul Moore
2014-11-12 21:21               ` Paul Moore
2014-11-12 21:25               ` Richard Guy Briggs
2014-11-12 21:25                 ` Richard Guy Briggs
2014-11-12 21:30                 ` Paul Moore [this message]
2014-11-12 21:30                   ` Paul Moore
2014-11-12 21:35                   ` Richard Guy Briggs
2014-11-12 21:35                     ` Richard Guy Briggs
2014-11-12 21:44                     ` Paul Moore
2014-11-12 21:44                       ` Paul Moore
2014-11-12 21:36                 ` [PATCH] selinux: convert WARN_ONCE() to printk() " 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=1709228.3j5ciILylX@sifl \
    --to=pmoore@redhat.com \
    --cc=james.l.morris@oracle.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=rgb@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=trinity@vger.kernel.org \
    --cc=vlee@twopensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.