public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BKL use in ptrace
@ 2009-12-20 18:53 Andi Kleen
  2009-12-21 17:02 ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2009-12-20 18:53 UTC (permalink / raw)
  To: oleg, linux-kernel; +Cc: torvalds


Hi,

ptrace has this comment/BKL use:

        /*
         * This lock_kernel fixes a subtle race with suid exec
         */
        lock_kernel();

But unless I'm blind I don't see execve actually getting the BKL
anywhere. So is this comment outdated or misleading (is the race with exit?)
or is there a bug?

Thanks,
-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BKL use in ptrace
  2009-12-20 18:53 BKL use in ptrace Andi Kleen
@ 2009-12-21 17:02 ` Oleg Nesterov
  2009-12-22  1:13   ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2009-12-21 17:02 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel, torvalds, Roland McGrath

(add Roland)

On 12/20, Andi Kleen wrote:
>
> ptrace has this comment/BKL use:
>
>         /*
>          * This lock_kernel fixes a subtle race with suid exec
>          */
>         lock_kernel();
>
> But unless I'm blind I don't see execve actually getting the BKL
> anywhere. So is this comment outdated or misleading (is the race with exit?)
> or is there a bug?

I never understood this lock_kernel().

In any case it looks outdated. We were going to kill it "soon",
along with other ptrace changes.

Oleg.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BKL use in ptrace
  2009-12-21 17:02 ` Oleg Nesterov
@ 2009-12-22  1:13   ` Roland McGrath
  0 siblings, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2009-12-22  1:13 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andi Kleen, linux-kernel, torvalds

> I never understood this lock_kernel().
> 
> In any case it looks outdated. We were going to kill it "soon",
> along with other ptrace changes.

I never understood it either.  It's very ancient and long predates many,
many ptrace cleanups.  If the comment was ever accurate, then any issue
like that is now covered by cred_guard_mutex.  I don't know of any reason
for (or really, effect of) using BKL in ptrace.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-22  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20 18:53 BKL use in ptrace Andi Kleen
2009-12-21 17:02 ` Oleg Nesterov
2009-12-22  1:13   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox