public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH] ptrace: copy_process() should disable stepping
Date: Mon, 9 Nov 2009 17:24:08 +0100	[thread overview]
Message-ID: <20091109162408.GA5160@redhat.com> (raw)
In-Reply-To: <20091109041546.925461E@magilla.sf.frob.com>

On 11/08, Roland McGrath wrote:
>
> That is inappropriate use of arch details in generic code.  It might
> happen to be harmless fritter in practice on the arch's we have but it
> is certainly not the correct way to go about things.  You should just
> call user_disable_single_step() unconditionally.  Even on an arch with
> no such machinery at all that should be defined safely as a no-op (see
> linux/ptrace.h).  If there is some reason not to do that, please
> explain it.

Yes, we have arch_has_single_step.

I added test_tsk_thread_flag(TIF_SINGLESTEP) check for 2 reasons: to
optimize out user_disable_single_step() in the likely case, and because
I wasn't sure it is safe to call user_disable_single_step() unconditionally.

OK, will resend, thanks.

Oleg.


  reply	other threads:[~2009-11-09 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 21:16 [PATCH] ptrace: copy_thread() should clear TIF_SINGLESTEP and X86_EFLAGS_TF Oleg Nesterov
2009-11-06 21:25 ` Roland McGrath
2009-11-06 21:50   ` Oleg Nesterov
2009-11-06 22:10     ` Roland McGrath
2009-11-07 21:55       ` [PATCH] ptrace: copy_process() should disable stepping Oleg Nesterov
2009-11-09  4:15         ` Roland McGrath
2009-11-09 16:24           ` Oleg Nesterov [this message]
2009-11-09 23:53           ` [PATCH v2] " Oleg Nesterov
2009-11-10 20:39             ` Roland McGrath

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=20091109162408.GA5160@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.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