From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@redhat.com>
Cc: Dmitry Kasatkin <d.kasatkin@samsung.com>,
linux-security-module <linux-security-module@vger.kernel.org>,
john.johansen@canonical.com,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
James Morris <jmorris@namei.org>,
viro@ZenIV.linux.org.uk,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kernel-team@lists.ubuntu.com
Subject: Re: Kernel panic at Ubuntu: IMA + Apparmor
Date: Fri, 25 Apr 2014 12:40:32 -0700 [thread overview]
Message-ID: <878uqt42q7.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <20140425192543.GA11908@redhat.com> (Oleg Nesterov's message of "Fri, 25 Apr 2014 21:25:43 +0200")
Oleg Nesterov <oleg@redhat.com> writes:
> On 04/25, Eric W. Biederman wrote:
>>
>> Oleg Nesterov <oleg@redhat.com> writes:
>>
>> > Eric, this makes me think again that we should do exit_task_namespaces()
>> > after exit_task_work(). We already discussed this before, but this looks
>> > like another indication this change makes sense.
>>
>> I know you mentioned something about that. I haven't actually had much
>> time to think about it.
>>
>> > The problem with fput() from free_nsproxy() was hopefully also fixed by
>> > e7b2c4069252. The main motivation for "move" was "outside of exit_notify".
>> > Even if we fix the paths above task_work_add() can have another user which
>> > wants ->nsproxy.
>> >
>> > What do you think?
>>
>> I am scratching my head. Delayed work that depends on current sort of
>> blows my mind.
>
> But task_work_add(task) was specially introduced to run a callback in the
> task's context.
>
>> That is utter nonsense.
>
> Yes I agree, _perhaps_ we can fix this particular problem without changing
> the exit_namespace/work ordering, and perhaps this makes sense anyway.
>
> Well. I _think_ that __fput() and ima_file_free() in particular should not
> depend on current and/or current->nsproxy. If nothing else, fput() can be
> called by the unrelated task which looks into /proc/pid/.
>
> But again, task_work_add() has more and more users, and it seems that even
> __fput() paths can do "everything", so perhaps it would be safer to allow
> to use ->nsproxy in task_work_run.
Like I said, give me a clear motivating case. Right now not allowing
nsproxy is turning up bugs in __fput. Which seems like a good thing.
Eric
next prev parent reply other threads:[~2014-04-25 19:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 13:00 Dmitry Kasatkin
2014-04-25 14:48 ` Dmitry Kasatkin
2014-04-25 18:23 ` Oleg Nesterov
2014-04-25 19:04 ` Eric W. Biederman
2014-04-25 19:25 ` Oleg Nesterov
2014-04-25 19:40 ` Eric W. Biederman [this message]
2014-04-25 20:01 ` Oleg Nesterov
2014-04-25 20:20 ` Dmitry Kasatkin
2014-04-25 20:45 ` Eric W. Biederman
2014-04-25 20:52 ` Dmitry Kasatkin
2014-04-25 21:27 ` Eric W. Biederman
2014-04-25 21:46 ` Dmitry Kasatkin
2014-04-25 21:56 ` Dmitry Kasatkin
2014-04-25 22:38 ` Eric W. Biederman
2014-04-26 8:58 ` Dmitry Kasatkin
2014-04-26 13:56 ` Al Viro
2014-04-26 16:54 ` Dmitry Kasatkin
2014-04-26 17:42 ` Al Viro
2014-04-26 19:03 ` Dmitry Kasatkin
2014-04-25 22:11 ` Eric W. Biederman
2014-04-26 8:49 ` Dmitry Kasatkin
2014-04-25 21:21 ` Al Viro
2014-04-25 21:43 ` Eric W. Biederman
2014-04-25 21:55 ` Al Viro
2014-04-25 22:25 ` Eric W. Biederman
2014-04-29 13:00 ` Mimi Zohar
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=878uqt42q7.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=d.kasatkin@samsung.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=zohar@linux.vnet.ibm.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
all inboxes | Powered by JetHome®