[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/FC-4 linux-2.6.9-audit-speedup.patch, NONE, 1.1 kernel-2.6.spec, 1.1422, 1.1423



Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv19769

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6.9-audit-speedup.patch 
Log Message:
speedup for audit.


linux-2.6.9-audit-speedup.patch:
 auditsc.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

--- NEW FILE linux-2.6.9-audit-speedup.patch ---
--- linux-2.6.9/kernel/auditsc.c~	2005-07-16 10:34:06.000000000 +0100
+++ linux-2.6.9/kernel/auditsc.c	2005-07-29 14:36:33.000000000 +0100
@@ -523,20 +523,23 @@ static enum audit_state audit_filter_sys
 					     struct list_head *list)
 {
 	struct audit_entry *e;
-	enum audit_state   state;
-	int		   word = AUDIT_WORD(ctx->major);
-	int		   bit  = AUDIT_BIT(ctx->major);
+	enum audit_state state;
 
 	if (audit_pid && tsk->tgid == audit_pid)
 		return AUDIT_DISABLED;
 
 	rcu_read_lock();
-	list_for_each_entry_rcu(e, list, list) {
-		if ((e->rule.mask[word] & bit) == bit
- 		    && audit_filter_rules(tsk, &e->rule, ctx, &state)) {
-			rcu_read_unlock();
-			return state;
-		}
+	if (!list_empty(list)) {
+		    int word = AUDIT_WORD(ctx->major);
+		    int bit  = AUDIT_BIT(ctx->major);
+
+		    list_for_each_entry_rcu(e, list, list) {
+			    if ((e->rule.mask[word] & bit) == bit
+				&& audit_filter_rules(tsk, &e->rule, ctx, &state)) {
+				    rcu_read_unlock();
+				    return state;
+			    }
+		    }
 	}
 	rcu_read_unlock();
 	return AUDIT_BUILD_CONTEXT;
@@ -1073,7 +1073,6 @@ void audit_syscall_exit(struct task_stru
 	} else {
 		audit_free_names(context);
 		audit_free_aux(context);
-		audit_zero_context(context, context->state);
 		tsk->audit_context = context;
 	}
 	put_task_struct(tsk);


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1422
retrieving revision 1.1423
diff -u -r1.1422 -r1.1423
--- kernel-2.6.spec	11 Aug 2005 22:52:36 -0000	1.1422
+++ kernel-2.6.spec	11 Aug 2005 22:53:43 -0000	1.1423
@@ -348,6 +348,7 @@
 Patch1900: linux-2.6.12-pwc-warning.patch
 Patch1910: linux-2.6.12-ns558-nodev-rmmod.patch
 Patch1930: linux-2.6-appletouch-update.patch
+Patch1940: linux-2.6.9-audit-speedup.patch
 Patch1950: linux-2.6-selinux-addrlen-checks.patch
 
 Patch2000: linux-2.6.11-vm-taint.patch
@@ -808,6 +809,8 @@
 %patch1910 -p1
 # Fix Appletouch tapping.
 %patch1930 -p1
+# Audit speedup in syscall path.
+%patch1940 -p1
 # Fix addrlen checks in selinux_socket_connect
 %patch1950 -p1
 
@@ -1278,6 +1281,7 @@
 
 %changelog
 * Thu Aug 11 2005 Dave Jones <davej redhat com>
+- Audit speedup in syscall path.
 - Update to a newer ACPI drop.
 
 * Fri Aug  5 2005 Dave Jones <davej redhat com> [2.6.12-1.1420_FC4]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]