[lkml]   [2005]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/5] Call security hooks conditionally if the security_op is filled out.
* Kurt Garloff ( wrote:
> You did not like my macro abuse, apparently.
> That's too bad, as it allowed you to do changes without changing
> hundreds of lines of code.

It was handy that way, but I think this way is just cleaner and simpler.
Esp. when checking against the function ptr, not the security_ops ptr.

> Just one remark:
> Make sure you don't set security_ops->XXX ever back to NULL or you
> might take an oops.
> Security module unloading is racy and always has been. It's not well
> defined at what point in time the new functions become effective.
> And we certainly don't want to use locking for performance reasons.
> One could think of using RCU, though, thus the security_ops pointer
> would only be changed after all CPUs schedule()d ...

Removing a security module has always been unsafe.

> In my version of the patches, I maintained the capability_security_ops
> structure fully filled-in and pointed security_ops to it, so you'll
> always have a valid function pointer. If you wanted to avoid a pointer
> compare, I had an integer to look at ...

Yes, that's how 2/5 is. At KS, there was specific mention of not doing
unconditional call. Comparing against security_ops only helps the case
where a module is not loaded. Checking the function ptr should help any
module with sparse ops.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-25 18:25    [W:0.064 / U:2.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site