Re: [PATCH] selinux: remove extraneous initialization of slots_used and max_chain_len

2017-10-16 Thread Joe Perches
On Sat, 2017-10-14 at 15:52 +0100, Colin King wrote: > From: Colin Ian King > > Variables slots_used and max_chain_len are being initialized to zero > twice. Remove the first set of initializations. Cleans up the > clang warnings: > > Value stored to 'slots_used' is

[PATCH 15/18] security: Remove pr_fmt duplicate logging prefixes

2018-05-10 Thread Joe Perches
Converting pr_fmt from a simple define to use KBUILD_MODNAME added some duplicate logging prefixes to existing uses. Remove them. Signed-off-by: Joe Perches <j...@perches.com> --- security/selinux/selinuxfs.c | 29 ++--- 1 file changed, 14 insertions(+), 15 del

Re: [-next PATCH] security: use octal not symbolic permissions

2018-06-14 Thread Joe Perches
On Wed, 2018-06-13 at 10:19 -0500, Serge E. Hallyn wrote: > Using octal and not symbolic permissions is preferred by many as more > > readable. > > > > see: https://lkml.org/lkml/2016/8/2/1945 > > Heh, well see also https://lkml.org/lkml/2016/8/2/2062 . We all love Al. I did reply then too.

Re: [PATCH 01/13] selinux: Cleanup printk logging in conditional

2018-06-12 Thread Joe Perches
On Tue, 2018-06-12 at 10:09 +0200, Peter Enderborg wrote: > Replace printk with pr_* to avoid checkpatch warnings. I believe it would be nicer to remove the "SELinux: " prefix embbeded in each format and use a specific #define pr_fmt(fmt) "SELinux: " fmt to automatically prefix these formats.

Re: [-next PATCH] security: use octal not symbolic permissions

2018-06-13 Thread Joe Perches
On Tue, 2018-06-12 at 17:12 -0400, Paul Moore wrote: > On Tue, Jun 12, 2018 at 4:32 PM, James Morris wrote: > > On Mon, 11 Jun 2018, Casey Schaufler wrote: > > > > > If you want to break this up by security module I would take > > > the Smack part as soon as James does the tree update. If James

Re: [-next PATCH] security: use octal not symbolic permissions

2018-06-13 Thread Joe Perches
On Wed, 2018-06-13 at 11:49 -0400, Paul Moore wrote: > On Tue, Jun 12, 2018 at 8:29 PM, Joe Perches wrote: > > On Tue, 2018-06-12 at 17:12 -0400, Paul Moore wrote: > > > Joe, in general I really appreciate the fixes you send, but these > > > patches that cross a

Re: [-next PATCH] security: use octal not symbolic permissions

2018-06-13 Thread Joe Perches
On Wed, 2018-06-13 at 12:19 -0400, Paul Moore wrote: > On Wed, Jun 13, 2018 at 12:04 PM, Joe Perches wrote: > > On Wed, 2018-06-13 at 11:49 -0400, Paul Moore wrote: > > > On Tue, Jun 12, 2018 at 8:29 PM, Joe Perches wrote: > > > > On Tue, 2018-06-12 at

[-next PATCH] security: use octal not symbolic permissions

2018-06-11 Thread Joe Perches
line wrapping around these conversions. o Remove now superfluous parentheses around direct use of 0600 Signed-off-by: Joe Perches --- security/apparmor/apparmorfs.c | 5 ++-- security/apparmor/lsm.c | 23 - security/integrity/ima/ima.h| 4 +-- security/integrity/ima/ima_fs.c | 13

Re: [PATCH 03/13] selinux: Cleanup printk logging in policydb

2018-06-19 Thread Joe Perches
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 > > --- > >

Re: [PATCH] selinux: Use pr_fmt to prefix "SELinux: "

2018-07-03 Thread Joe Perches
On Mon, 2018-07-02 at 22:41 -0400, Paul Moore wrote: > > It still applies today to -next. > > It doesn't apply cleanly to the selinux/next branch, I believe because > there are other trees which have made changes under security/selinux/* > (I believe there was some fs related work from David

Re: [PATCH] selinux: Use pr_fmt to prefix "SELinux: "

2018-07-03 Thread Joe Perches
On Mon, 2018-07-02 at 16:51 -0400, Paul Moore wrote: > On Wed, Jun 20, 2018 at 2:39 AM Joe Perches wrote: > > pr_fmt can be used with the pr_ macros to prefix > > arbitrary content to logging messages. > > > > So add '#define pr_fmt(fmt) "SELinux: " f

[PATCH] selinux: Use pr_fmt to prefix "SELinux: "

2018-06-20 Thread Joe Perches
lign arguments o Add missing space to a coalesced format o Remove "SELinux: " from SEL_MOUNT_FAIL_MSG as that is directly used only in pr_warn o Add missing terminating \n to some formats o Consistently use single space after logging prefixes Signed-off-by: Joe Perches --- security/