From: Casey Schaufler <casey@schaufler-ca.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andi Kleen <ak@linux.intel.com>,
jmorris@namei.org, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] SMACK: Add missing rcu_read_lock/unlock for process capability walk.
Date: Thu, 21 Apr 2011 20:55:47 -0700 [thread overview]
Message-ID: <4DB0FC43.8000800@schaufler-ca.com> (raw)
In-Reply-To: <20110421155832.GU16484@one.firstfloor.org>
On 4/21/2011 8:58 AM, Andi Kleen wrote:
> On Wed, Apr 20, 2011 at 05:47:40PM -0700, Casey Schaufler wrote:
>> On 4/20/2011 5:08 PM, Andi Kleen wrote:
>>>> The global list, yes. The task specific list, no. Modifying the local
>>>> list is like any other modification of the cred structure and requires
>>>> the cred be copied.
>>> But you still need to free it eventually right? And that freeing will
>>> need RCU on the reader.
>> Entries are never freed from the global list. Someone is working
>> on a patch to do that, but is running into - wait for it - locking
>> issues.
> Then why do you use rcu_read_lock() at all?
Because the entries can be modified in place.
> You can drop all the rcu_read_lock()s and probably the other *_rcu
> list accesses then. And my patch is indeed not needed.
>
>> Entries on the local lists are only freed when the task exits.
> You mean the last user of the cred?
Yes.
> -Andi
>
prev parent reply other threads:[~2011-04-22 3:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 22:00 [PATCH] SMACK: Add missing rcu_read_lock/unlock for process capability walk Andi Kleen
2011-04-20 22:51 ` Casey Schaufler
2011-04-20 23:18 ` Andi Kleen
2011-04-20 23:43 ` Casey Schaufler
2011-04-21 0:08 ` Andi Kleen
2011-04-21 0:47 ` Casey Schaufler
2011-04-21 15:58 ` Andi Kleen
2011-04-22 3:55 ` Casey Schaufler [this message]
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=4DB0FC43.8000800@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/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