From: Chris Wright <chrisw@osdl.org>
To: Kurt Garloff <garloff@suse.de>, Chris Wright <chrisw@osdl.org>,
linux-security-module@wirex.com,
Linux kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] Call security hooks conditionally if the security_op is filled out.
Date: Thu, 25 Aug 2005 09:24:03 -0700 [thread overview]
Message-ID: <20050825162403.GV7762@shell0.pdx.osdl.net> (raw)
In-Reply-To: <20050825085039.GW12218@tpkurt.garloff.de>
* Kurt Garloff (garloff@suse.de) 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.
next prev parent reply other threads:[~2005-08-25 16:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-25 1:20 [PATCH 0/5] LSM hook updates Chris Wright
2005-08-25 1:20 ` [PATCH 1/5] Use capabilities as default w/ and w/out CONFIG_SECURITY Chris Wright
2005-08-25 1:20 ` [PATCH 2/5] Rework stubs in security.h Chris Wright
2005-08-26 17:31 ` Tony Jones
2005-08-26 17:59 ` Chris Wright
2005-08-26 18:03 ` Tony Jones
2005-08-26 18:00 ` Stephen Smalley
2005-08-26 18:08 ` Chris Wright
2005-08-26 18:11 ` Tony Jones
2005-08-25 1:20 ` [PATCH 3/5] Call security hooks conditionally if the security_op is filled out Chris Wright
2005-08-25 8:50 ` Kurt Garloff
2005-08-25 16:24 ` Chris Wright [this message]
2005-08-25 1:20 ` [PATCH 4/5] Remove unnecessary default capability callbacks Chris Wright
2005-08-25 1:20 ` [PATCH 5/5] Remove unnecesary capability hooks in rootplug Chris Wright
2005-08-25 14:38 ` serue
2005-08-25 15:13 ` Stephen Smalley
2005-08-25 16:21 ` Chris Wright
2005-08-25 16:23 ` Stephen Smalley
2005-08-25 17:06 ` Chris Wright
2005-08-25 21:13 ` Chris Wright
2005-08-25 16:28 ` serue
2005-08-25 21:12 ` Chris Wright
2005-08-31 6:34 ` Greg KH
2005-08-31 15:09 ` Chris Wright
2005-08-25 4:39 ` [PATCH 0/5] LSM hook updates James Morris
2005-08-25 5:32 ` Chris Wright
2005-08-25 19:15 ` Chris Wright
2005-08-26 9:23 ` serue
2005-08-26 13:27 ` Stephen Smalley
2005-08-26 10:30 ` serue
2005-08-26 16:41 ` Chris Wright
2005-08-26 17:35 ` serue
2005-08-26 17:49 ` Chris Wright
2005-08-25 9:52 ` serue
2005-08-25 10:18 ` serue
2005-08-25 16:19 ` Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050825162403.GV7762@shell0.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=garloff@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@wirex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox