Re: [PATCH 2/3] SELINUX: Make selinux cache VFS RCU walks safe

From: Andi Kleen
Date: Fri Apr 22 2011 - 11:17:32 EST


On Thu, Apr 21, 2011 at 08:45:17PM -0400, Eric Paris wrote:
> I'll take a close look over the weekend, but I'm pretty sure this is
> even more strict than it needs to be. I looked at this a while ago
> and the only RCU unsafe location I could find was in the generic LSM
> 'audit' code (nothing to do with the audit subsystem). That code can
> do a d = d_find_alias(); dput(d). I don't think I realized the dput()
> was not RCU safe at the time. We use it to come up with a name of a
> dentry that might have caused the denial (although obviously not
> necessarily the right name)
>
> I could just drop that piece of functionality (and rely on the audit
> subsystem for the info), but I think I'd rather do it your way. I
> think I can push your flags a lot deeper than you have pushed them
> (and remove them in some places you have included them). Let me look
> over the next day or two....

Sounds good. I would prefer to do that as a follow on patch to make
this patch not even more complicated. Is that ok for you?

Also the same approach could be applied to SMACK then I guess.

-Andi
--
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/