linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] audit: clear thread flag for new children
@ 2007-10-26 20:42 Tony Jones
  2007-10-26 22:42 ` Chris Wright
  2007-10-27 14:21 ` Steve Grubb
  0 siblings, 2 replies; 9+ messages in thread
From: Tony Jones @ 2007-10-26 20:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: chrisw, linux-audit, viro

From: Tony Jones <tonyj@suse.de>

Minor performance enhancement.

Thread flag TIF_SYSCALL_AUDIT is not cleared for new children when audit 
context creation has been disabled (auditctl -e0). This can cause new children 
forked from a parent created when audit was enabled to not take the fastest 
syscall path thru entry.S

Signed-off-by: Tony Jones <tonyj@suse.de>
---
 kernel/auditsc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -814,8 +814,10 @@ int audit_alloc(struct task_struct *tsk)
 	struct audit_context *context;
 	enum audit_state     state;
 
-	if (likely(!audit_enabled))
+	if (likely(!audit_enabled)) {
+		clear_tsk_thread_flag(tsk, TIF_SYSCALL_AUDIT);
 		return 0; /* Return if not auditing. */
+	}
 
 	state = audit_filter_task(tsk);
 	if (likely(state == AUDIT_DISABLED))

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

end of thread, other threads:[~2007-11-01 18:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 20:42 [PATCH] audit: clear thread flag for new children Tony Jones
2007-10-26 22:42 ` Chris Wright
2007-10-27 14:21 ` Steve Grubb
2007-10-29 17:20   ` Tony Jones
2007-10-29 22:04     ` Steve Grubb
2007-10-29 23:15       ` Tony Jones
2007-11-01 14:33         ` Steve Grubb
2007-11-01 17:23           ` Tony Jones
2007-11-01 18:34             ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).