lkml.org 
[lkml]   [2014]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist
From
Date
On Mon, 2014-02-03 at 11:11 -0800, Andy Lutomirski wrote:

> +void audit_inc_n_rules()
> +{
> + struct task_struct *p, *g;
> + unsigned long flags;
> +
> + read_lock_irqsave(&tasklist_lock, flags);
> + if (audit_n_rules++ == 0) {

I know it's right, but it's too clever for me :) If we do end up
adding something like this Can we just do:
if (!audit_n_rules) {}
audit_n_rules++

I like dumb code :)

> + do_each_thread(g, p) {
> + if (p->audit_context)
> + set_tsk_thread_flag(p, TIF_SYSCALL_AUDIT);
> + } while_each_thread(g, p);
> + }
> + read_unlock_irqrestore(&tasklist_lock, flags);
> +}



\
 
 \ /
  Last update: 2014-02-05 15:01    [W:0.090 / U:2.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site