From: "Dmitry V. Levin" <ldv@altlinux.org>
To: sparclinux@vger.kernel.org
Subject: Re: using ptrace to cancel a syscall on sparc
Date: Sun, 20 Dec 2015 23:31:44 +0000 [thread overview]
Message-ID: <20151220233144.GA23664@altlinux.org> (raw)
In-Reply-To: <20151220054754.GZ11489@vapier.lan>
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
On Sun, Dec 20, 2015 at 12:47:54AM -0500, Mike Frysinger wrote:
> i've been playing with ptrace on sparc and trying to use it to watch and
> cancel specific syscalls. i have this working for other arches already.
[...]
> i'm having trouble with canceling of the syscall itself. seems like
> no matter what i stuff into o0, the kernel executes the unlink. i've
> tried tracing arch/sparc/kernel/syscalls.S and kernel/head_64.S, the
> the entry is linux_sparc_syscall32 which calls linux_syscall_trace32,
> but it seems like the o0 stuff doesn't seem to work for me. my sparc
> asm foo isn't strong enough to figure out what's going wrong :/.
Yes, sparc is odd in this respect: whatever you write to u_regs[] on
entering syscall, it doesn't affect syscall number or syscall arguments.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-12-20 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 5:47 using ptrace to cancel a syscall on sparc Mike Frysinger
2015-12-20 23:31 ` Dmitry V. Levin [this message]
2016-01-18 11:32 ` Mike Frysinger
2016-01-19 19:39 ` David Miller
2016-01-19 20:10 ` David Miller
2016-01-19 20:56 ` Mike Frysinger
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=20151220233144.GA23664@altlinux.org \
--to=ldv@altlinux.org \
--cc=sparclinux@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