Re: file capabilities: clear fcaps on inode change (v3)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Serge E. Hallyn <sergeh@...>
Cc: Andrew Morgan <morgan@...>, Chris Wright <chrisw@...>, Andrew Morgan <agm@...>, <casey@...>, Andrew Morton <akpm@...>, Stephen Smalley <sds@...>, KaiGai Kohei <kaigai@...>, James Morris <jmorris@...>, <linux-security-module@...>, lkml <linux-kernel@...>
Date: Tuesday, August 7, 2007 - 6:38 pm

On Tue, 2007-08-07 at 17:17 -0500, Serge E. Hallyn wrote:


You are unconditionally taking the i_mutex whether or not you actually
have any capabilities to remove. Normally, removing capabilities due to
a write is something which occurs once every blue moon. Can't you
introduce a heuristic along the lines of should_remove_suid() in order
to optimise away the common case?

In addition, if you need to remove both the capabilities and the suid
bits, then it should be unnecessary to take the i_mutex twice.


Trond

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
file capabilities: clear fcaps on inode change (v3), Serge E. Hallyn, (Tue Aug 7, 6:17 pm)
Re: file capabilities: clear fcaps on inode change (v3), Trond Myklebust, (Tue Aug 7, 6:38 pm)
Re: file capabilities: clear fcaps on inode change (v3), Serge E. Hallyn, (Tue Aug 7, 7:14 pm)
Re: file capabilities: clear fcaps on inode change (v3), Serge E. Hallyn, (Wed Aug 8, 9:30 am)
Re: file capabilities: clear fcaps on inode change (v3), James Morris, (Wed Aug 8, 10:08 am)