[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110428185416.GB13071@hallyn.com>
Date: Thu, 28 Apr 2011 13:54:16 -0500
From: "Serge E. Hallyn" <serge@...lyn.com>
To: Will Drewry <wad@...omium.org>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
kees.cook@...onical.com, eparis@...hat.com, agl@...omium.org,
mingo@...e.hu, jmorris@...ei.org,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, Michal Marek <mmarek@...e.cz>,
Oleg Nesterov <oleg@...hat.com>,
Roland McGrath <roland@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Jiri Slaby <jslaby@...e.cz>,
David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 3/7] seccomp_filter: Enable ftrace-based system call
filtering
Quoting Will Drewry (wad@...omium.org):
> My intent was to make them available for use by seccomp.c during state
> teardown/dup. I don't think there's benefit to exposing them outside
> of that. Would dropping the export, and adding an local seccomp.h
> with the shared functions in them resolve that more cleanly?
And add a clear comment explaining :)
> > Your code would have been correct if you could call kzalloc under
> > rcu_read_lock() (which you can on some kernel configurations but not
> > all). The issue is that you need to pull out that allocation from the
> > rcu_read_lock() because rcu_read_lock assumes you can't preempt, and
> > that allocation can schedule out. The access to the filters must be done
> > under rcu_read_lock(), other than that, you're fine.
>
> That makes sense. I think I'd prefer to not share those functions
> rather than guard the list just in case a future consumer of the
> interface comes along. Would that make sense to you? Since I don't
> see any other users right now other than seccomp.c, it might make
> sense to tackle the impact when an actual need arises.
>
> I'll go whichever way pointed on this, though.
Complicating the locking for nonexistent users doesn't seem like the
right way.
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists