[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090509185906.GB10396@redhat.com>
Date: Sat, 9 May 2009 20:59:06 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: David Howells <dhowells@...hat.com>
Cc: roland@...hat.com, jmorris@...ei.org, chrisw@...s-sol.org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, eparis@...hat.com,
sds@...ho.nsa.gov, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 1/2] CRED: Rename cred_exec_mutex to reflect that it's
a guard against ptrace
Sorry for delay,
On 05/08, David Howells wrote:
>
> @@ -185,10 +185,11 @@ int ptrace_attach(struct task_struct *task)
> if (same_thread_group(task, current))
> goto out;
>
> - /* Protect exec's credential calculations against our interference;
> - * SUID, SGID and LSM creds get determined differently under ptrace.
> + /* Protect the target's credential calculations against our
> + * interference; SUID, SGID and LSM creds get determined differently
> + * under ptrace.
> */
> - retval = mutex_lock_interruptible(&task->cred_exec_mutex);
> + retval = mutex_lock_interruptible(&task->cred_guard_mutex);
> if (retval < 0)
> goto out;
>
> @@ -232,7 +233,7 @@ repeat:
> bad:
> write_unlock_irqrestore(&tasklist_lock, flags);
> task_unlock(task);
> - mutex_unlock(&task->cred_exec_mutex);
> + mutex_unlock(&task->cred_guard_mutex);
This rename is obviously fine, but conflicts with
ptrace-do-not-use-task_lock-for-attach.patch in -mm tree:
-bad:
- write_unlock_irqrestore(&tasklist_lock, flags);
- task_unlock(task);
+unlock_tasklist:
+ write_unlock_irq(&tasklist_lock);
+unlock_creds:
mutex_unlock(&task->cred_exec_mutex);
out:
return retval;
Hmm. Ingo's "rename ptrace_may_access => ptrace_access_check" conflicts
with my patch too.
Andrew, Roland, I guess I should re-send
ptrace-ptrace_attach-check-pf_kthread-exit_state-instead-of-mm.patch
ptrace-cleanup-check-set-of-pt_ptraced-during-attach.patch
ptrace-do-not-use-task_lock-for-attach.patch
patches?
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists