The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Parag Warudkar <parag.lkml@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, eparis@redhat.com
Subject: [PATCH] Seccomp audit: Reduce unnecessary log spew
Date: Sat, 8 Sep 2012 11:02:40 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1209081042390.6765@ubuntu> (raw)

Every time I run Chrome from dev channel, which uses seccomp, logs are 
flooded with below repetitive entries -

 2093.889522] audit_printk_skb: 42 callbacks suppressed
[ 2093.889527] type=1701 audit(1347114113.889:62): auid=4294967295 
uid=1000 gid=1000 ses=4294967295 pid=5329 comm="chrome" reason="seccomp" 
sig=0 syscall=2 compat=0 ip=0x7f1a63b45d90 code=0x50000

Reduce the seemingly needless repetitive logging by honoring audit_enabled 
and checking if the signal is worth auditing.

Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 4b96415..6c3012a 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2715,6 +2715,9 @@ void __audit_seccomp(unsigned long syscall, long signr, int code)
 {
 	struct audit_buffer *ab;
 
+	if (!audit_enabled || !signr || signr == SIGQUIT)
+		return;
+
 	ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND);
 	audit_log_abend(ab, "seccomp", signr);
 	audit_log_format(ab, " syscall=%ld", syscall);

                 reply	other threads:[~2012-09-08 15:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.DEB.2.02.1209081042390.6765@ubuntu \
    --to=parag.lkml@gmail.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox