[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <530BC8D2.9050503@schaufler-ca.com>
Date: Mon, 24 Feb 2014 14:33:54 -0800
From: Casey Schaufler <casey@...aufler-ca.com>
To: Joe Perches <joe@...ches.com>
CC: linux-kernel@...r.kernel.org,
James Morris <james.l.morris@...cle.com>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 6/8] security: smack: Use a more current logging style
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>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists