From: Casey Schaufler <casey@schaufler-ca.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
James Morris <james.l.morris@oracle.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH 6/8] security: smack: Use a more current logging style
Date: Mon, 24 Feb 2014 14:33:54 -0800 [thread overview]
Message-ID: <530BC8D2.9050503@schaufler-ca.com> (raw)
In-Reply-To: <1393280598.11020.77.camel@joe-AO722>
On 2/24/2014 2:23 PM, Joe Perches wrote:
> On Mon, 2014-02-24 at 14:16 -0800, Casey Schaufler wrote:
>> On 2/24/2014 1:59 PM, Joe Perches wrote:
>>> Convert printks to pr_<level>
>>> Add pr_fmt.
>>> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> []
>>> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>>> +
>> What is pr_fmt() for?
> Prefixing "smack: " to the pr_<level> uses.
OK. I didn't see where it was used. I understand now. I'll go
back and ACK the changes.
>
>>> @@ -2106,8 +2108,7 @@ static int smack_inode_setsecurity(struct inode *inode, const char *name,
>>> if (sock->sk->sk_family == PF_INET) {
>>> rc = smack_netlabel(sock->sk, SMACK_CIPSO_SOCKET);
>>> if (rc != 0)
>>> - printk(KERN_WARNING
>>> - "Smack: \"%s\" netlbl error %d.\n",
>>> + pr_warn("\"%s\" netlbl error %d\n",
>>> __func__, -rc);
> This will be now be emitted as
>
> <4>smack: "smack_inode_setsecurity" netlbl error -<d>
>
> instead of
>
> <4>Smack: "smack_inode_setsecurity" netlbl error -<d>
>
> Though it'd be a lot more common to use:
>
> pr_warn("%s: netlbl error: %d\n",
> __func__, -rc);
>
> so the output would be:
>
> <4>smack: smack_inode_setsecurity: netlbl error: -<d>
>
>
>
next prev parent reply other threads:[~2014-02-24 22:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 21:59 [PATCH 0/8] security: Use a more current logging style Joe Perches
2014-02-24 21:59 ` [PATCH 1/8] " Joe Perches
2014-02-25 19:10 ` Serge Hallyn
2014-02-25 19:34 ` Joe Perches
2014-02-25 19:41 ` [PATCH V2 " Joe Perches
2014-02-24 21:59 ` [PATCH 2/8] security: apparmor: " Joe Perches
2014-02-26 7:31 ` John Johansen
2014-02-26 14:43 ` Joe Perches
2014-02-24 21:59 ` [PATCH 3/8] security: integrity: " Joe Perches
2014-02-25 2:59 ` Mimi Zohar
2014-02-24 21:59 ` [PATCH 4/8] security: keys: " Joe Perches
2014-02-24 21:59 ` [PATCH 5/8] security: selinux: " Joe Perches
2014-02-24 21:59 ` Joe Perches
2014-02-25 20:05 ` Paul Moore
2014-02-25 20:05 ` Paul Moore
2014-02-25 20:20 ` Joe Perches
2014-02-25 20:20 ` Joe Perches
2014-02-24 21:59 ` [PATCH 6/8] security: smack: " Joe Perches
2014-02-24 22:16 ` Casey Schaufler
2014-02-24 22:23 ` Joe Perches
2014-02-24 22:33 ` Casey Schaufler [this message]
2014-02-24 22:35 ` Casey Schaufler
2014-02-24 23:01 ` Casey Schaufler
2014-02-25 7:47 ` James Morris
[not found] ` <17D2BA68-5581-4326-B6DD-5EC959235B71@aol.com>
2014-02-26 0:56 ` Joe Perches
2014-02-24 22:00 ` [PATCH 7/8] security: tomoyo: " Joe Perches
2014-02-25 12:58 ` Tetsuo Handa
2014-02-24 22:00 ` [PATCH 8/8] security: yama: " Joe Perches
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=530BC8D2.9050503@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=james.l.morris@oracle.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/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.