From: David Mosberger <davidm@hpl.hp.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: David Mosberger <davidm@hpl.hp.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] proposed fix for ptrace() SMP race
Date: Fri, 7 Sep 2001 08:35:31 -0700 [thread overview]
Message-ID: <15256.59715.523045.796917@napali.hpl.hp.com> (raw)
In-Reply-To: <20010907152858.O11329@athlon.random>
In-Reply-To: <200109062300.QAA27430@napali.hpl.hp.com> <20010907021900.L11329@athlon.random> <15256.6038.599811.557582@napali.hpl.hp.com> <20010907032801.N11329@athlon.random> <15256.22858.57091.769101@napali.hpl.hp.com> <20010907152858.O11329@athlon.random>
>>>>> On Fri, 7 Sep 2001 15:28:58 +0200, Andrea Arcangeli <andrea@suse.de> said:
Andrea> correct, I suggest to ignore SIGCONT as well while
Andrea> PT_PTRACED is set.
Do you really think it's acceptable? With your patch, you couldn't
SIGKILL or SIGCONT a task that happens to be ptraced. I certainly
would expect to be able to do this for a task that is being strace'd,
for example.
Also, other signals will still wake up the task. Yes, it won't get
very far as do_signal() will notify the parent instead, but still, the
task will run and that could be enough to create some race condition.
What about the other wakeup paths that I had mentioned? E.g., what if
the ptraced task is ptracing another task? Couldn't notify_parent()
end up waking up the task as well?
Andrea> Also when you restore the cpus_allowed you won't effectively
Andrea> wakup the task, it will just keep floating in the runqueue
Andrea> but we won't try to reschedule the other idle cpus it so
Andrea> it's broken.
Ah, that's a good point, thanks. Nothing that can't be fixed, though.
>> Hmmh, looking at ptrace() more closely, the entire locking
>> situation seems to be a bit confused. For example, what's
>> stopping wait4() from releasing the task structure just after
>> ptrace() released the tasklist_lock and before it checked
>> child->state?
Andrea> the get_task_struct()
Yes, I missed that.
--david
next prev parent reply other threads:[~2001-09-07 15:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-06 23:00 David Mosberger
2001-09-07 0:19 ` Andrea Arcangeli
2001-09-07 0:40 ` David Mosberger
2001-09-07 1:28 ` Andrea Arcangeli
2001-09-07 1:41 ` Alan Cox
2001-09-07 13:34 ` Andrea Arcangeli
2001-09-07 5:21 ` David Mosberger
2001-09-07 13:28 ` Andrea Arcangeli
2001-09-07 15:35 ` David Mosberger [this message]
2001-09-08 17:11 ` Andrea Arcangeli
2001-09-10 17:20 ` David Mosberger
2001-09-10 17:54 Manfred Spraul
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=15256.59715.523045.796917@napali.hpl.hp.com \
--to=davidm@hpl.hp.com \
--cc=andrea@suse.de \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®