From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix restoration of IP scratch register when auditing syscalls
Date: Mon, 30 Apr 2012 20:00:15 +0100 [thread overview]
Message-ID: <20120430190015.GV24211@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20120430100746.GA11080@mudshark.cambridge.arm.com>
On Mon, Apr 30, 2012 at 11:07:46AM +0100, Will Deacon wrote:
> diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
> index 80abafb..bfcadc0 100644
> --- a/arch/arm/kernel/ptrace.c
> +++ b/arch/arm/kernel/ptrace.c
> @@ -916,14 +916,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
> {
> unsigned long ip;
>
> - /*
> - * Save IP. IP is used to denote syscall entry/exit:
> - * IP = 0 -> entry, = 1 -> exit
> - */
> - ip = regs->ARM_ip;
> - regs->ARM_ip = why;
> -
> - if (!ip)
> + if (why)
Umm yes, that original code is complete crap, because the old IP value
has no meaning what so ever. The replacement looks much better here.
next prev parent reply other threads:[~2012-04-30 19:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-29 6:38 Fixing audit on ARM Jon Masters
2012-04-29 6:38 ` [PATCH] ARM: Fix restoration of IP scratch register when auditing syscalls Jon Masters
2012-04-30 10:07 ` Will Deacon
2012-04-30 18:55 ` Jon Masters
2012-05-01 11:07 ` Will Deacon
2012-05-01 11:37 ` Russell King - ARM Linux
2012-05-01 16:52 ` Jon Masters
2012-05-02 6:27 ` Jon Masters
2012-05-02 8:58 ` Will Deacon
2012-05-02 14:10 ` Jon Masters
2012-05-02 14:48 ` Eric Paris
2012-05-02 15:39 ` Will Deacon
2012-05-02 17:37 ` Jon Masters
2012-04-30 19:00 ` Russell King - ARM Linux [this message]
2012-05-03 2:59 ` Jon Masters
2012-05-03 3:03 ` Al Viro
2012-05-03 8:55 ` Will Deacon
2012-05-03 7:34 ` Russell King - ARM Linux
2012-05-02 6:22 ` Jon Masters
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=20120430190015.GV24211@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).