mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selinux: downgrade two printks to KERN_DEBUG
@ 2011-04-08  9:03 Paul Bolle
  2011-04-08 13:00 ` Eric Paris
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2011-04-08  9:03 UTC (permalink / raw)
  To: Stephen Smalley, James Morris, Eric Paris; +Cc: linux-kernel

A recent (Fedora Rawhide) selinux policy update triggers this error:
    filename_trans_read: nel=0

But there seems to be no reason why filename_trans_read() prints this
message (and a similar message) at KERN_ERR level. So downgrade it to
KERN_DEBUG level.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Compile tested only.

 security/selinux/ss/policydb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index e7b850a..8e9cc8d10 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -1819,7 +1819,7 @@ static int filename_trans_read(struct policydb *p, void *fp)
 		goto out;
 	nel = le32_to_cpu(buf[0]);
 
-	printk(KERN_ERR "%s: nel=%d\n", __func__, nel);
+	printk(KERN_DEBUG "%s: nel=%d\n", __func__, nel);
 
 	last = p->filename_trans;
 	while (last && last->next)
@@ -1857,7 +1857,7 @@ static int filename_trans_read(struct policydb *p, void *fp)
 			goto out;
 		name[len] = 0;
 
-		printk(KERN_ERR "%s: ft=%p ft->name=%p ft->name=%s\n", __func__, ft, ft->name, ft->name);
+		printk(KERN_DEBUG "%s: ft=%p ft->name=%p ft->name=%s\n", __func__, ft, ft->name, ft->name);
 
 		rc = next_entry(buf, fp, sizeof(u32) * 4);
 		if (rc)
-- 
1.7.4.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selinux: downgrade two printks to KERN_DEBUG
  2011-04-08  9:03 [PATCH] selinux: downgrade two printks to KERN_DEBUG Paul Bolle
@ 2011-04-08 13:00 ` Eric Paris
  2011-05-08 10:46   ` Paul Bolle
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Paris @ 2011-04-08 13:00 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Stephen Smalley, James Morris, Eric Paris, linux-kernel

They shouldn't be there at all and it was a big screw up on my part that
they were left in the committed code.  I already applied but haven't
sent or pushed a patch to remove these.  Thanks Paul!

-Eric

On Fri, 2011-04-08 at 11:03 +0200, Paul Bolle wrote:
> A recent (Fedora Rawhide) selinux policy update triggers this error:
>     filename_trans_read: nel=0
> 
> But there seems to be no reason why filename_trans_read() prints this
> message (and a similar message) at KERN_ERR level. So downgrade it to
> KERN_DEBUG level.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Compile tested only.
> 
>  security/selinux/ss/policydb.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
> index e7b850a..8e9cc8d10 100644
> --- a/security/selinux/ss/policydb.c
> +++ b/security/selinux/ss/policydb.c
> @@ -1819,7 +1819,7 @@ static int filename_trans_read(struct policydb *p, void *fp)
>  		goto out;
>  	nel = le32_to_cpu(buf[0]);
>  
> -	printk(KERN_ERR "%s: nel=%d\n", __func__, nel);
> +	printk(KERN_DEBUG "%s: nel=%d\n", __func__, nel);
>  
>  	last = p->filename_trans;
>  	while (last && last->next)
> @@ -1857,7 +1857,7 @@ static int filename_trans_read(struct policydb *p, void *fp)
>  			goto out;
>  		name[len] = 0;
>  
> -		printk(KERN_ERR "%s: ft=%p ft->name=%p ft->name=%s\n", __func__, ft, ft->name, ft->name);
> +		printk(KERN_DEBUG "%s: ft=%p ft->name=%p ft->name=%s\n", __func__, ft, ft->name, ft->name);
>  
>  		rc = next_entry(buf, fp, sizeof(u32) * 4);
>  		if (rc)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selinux: downgrade two printks to KERN_DEBUG
  2011-04-08 13:00 ` Eric Paris
@ 2011-05-08 10:46   ` Paul Bolle
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Bolle @ 2011-05-08 10:46 UTC (permalink / raw)
  To: Eric Paris; +Cc: Stephen Smalley, James Morris, Eric Paris, linux-kernel

Eric,

On Fri, 2011-04-08 at 09:00 -0400, Eric Paris wrote:
> They shouldn't be there at all and it was a big screw up on my part that
> they were left in the committed code.  I already applied but haven't
> sent or pushed a patch to remove these.  Thanks Paul!

0) What's the status of your patch? It is not part of v2.6.39-rc6, is
it?

1) See, I just booted v2.6.39-rc6 and over a thousand of these messages
blew away the messages from the first (about) ten seconds of my first
boot of that kernel:
> $ dmesg | grep filename_trans_read | wc -l
> 1277

As is to be expected, this happened just when I wanted to see how I
apparently misconfigured something by looking at the messages the kernel
prints in those first few seconds ...


Paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-08 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08  9:03 [PATCH] selinux: downgrade two printks to KERN_DEBUG Paul Bolle
2011-04-08 13:00 ` Eric Paris
2011-05-08 10:46   ` Paul Bolle

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®