All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH] ARM: ptrace: remove single-step emulation code
Date: Thu, 20 Jan 2011 09:23:17 -0000	[thread overview]
Message-ID: <000001cbb883$ac70a0c0$0551e240$@deacon@arm.com> (raw)
In-Reply-To: <87vd1kblax.fsf@lechat.rtp-net.org>

Arnaud,

> > strace works fine with this patch applied and, looking at the
> > sources, it doesn't use the SINGLESTEP request. As for ltrace,
> > it *does* use SINGLESTEP but it can use PTRACE_SYSCALL instead
> > (indeed, it does this for sparc, ia64 and mips). ltrace doesn't
> > have code for checking the ptrace return value so I'd say it's
> > their bug.
> 
> afair, the current way to prevent SINGLESTEP usage in ltrace is to
> modify some #ifdef. So, while I agree that not checking ptrace return
> value is not nice, it has nothing to do with SINGLESTEP removal as this
> call will not get compiled in. What matters is rather to know if things
> are still working once the #ifdef are changed and if they're not,
> finding if it's a bug in ltrace or kernel.

Not true. A PTRACE_SINGLESTEP request will simply return -EIO. Userspace
programs should check the return value anyway because it could fail and
then handle the failure gracefully (in the case of ltrace, by trying a
PTRACE_SYSCALL request). This also means that ltrace is currently broken
on Thumb, where PTRACE_SINGLESTEP will return an error code.

Will

  reply	other threads:[~2011-01-20  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 15:07 [RFC][PATCH] ARM: ptrace: remove single-step emulation code Will Deacon
2011-01-19 15:19 ` Russell King - ARM Linux
2011-01-19 15:37   ` Will Deacon
2011-01-19 22:06     ` Arnaud Patard (Rtp)
2011-01-20  9:23       ` Will Deacon [this message]
2011-01-24  9:50 ` Timo Juhani Lindfors
2011-01-24 16:18   ` Will Deacon

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='000001cbb883$ac70a0c0$0551e240$@deacon@arm.com' \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.