Re: [PATCH] audit: speedup for syscalls when auditing is disabled
From: Eric Paris
Date: Fri Aug 27 2010 - 13:49:38 EST
On Thu, 2010-08-26 at 13:34 +1000, Anton Blanchard wrote:
> Hi Eric,
>
> Here's another approach Mikey and I were discussing. We allocate the
> tsk->audit_context as before, but we avoid setting the TIF_SYSCALL_AUDIT until
> the first rule gets added.
>
> We could look at clearing the flag when the rules go back to zero, but this
> simple patch covers the most common case I think.
It just dawned on me where we are going to have problems. We have
things other than syscall filter rules that can cause us to want the
collected audit info. Namely SELinux (or other LSM) denials.
Crap.
So the change in audit_alloc() should probably be conditionalized on
more than just audit_n_rules(). Not exactly sure what that is though.
It might also make our syscall entry/exit speedups not as great of an
idea as I thought. I need to look for other audit users to see how
these things are oging to affect them :(
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/