On Sun, Apr 29, 2012 at 02:40:01AM -0400, Jon Masters wrote:
-------- Original Message --------
Subject: [PATCH] ARM: Fix restoration of IP scratch register when
auditing syscalls
Date: Sun, 29 Apr 2012 02:38:24 -0400
From: Jon Masters <jcm(a)jonmasters.org>
To: Linux ARM Kernel <linux-arm-kernel(a)lists.infradead.org>
CC: Jon Masters <jcm(a)redhat.com>, Al Viro <viro(a)zeniv.linux.org.uk>,
Eric Paris <eparis(a)redhat.com>, Jon Masters <jcm(a)jonmasters.org>
The audit subsystem builds upon ptrace to record system calls. This is done
in a couple of places (on return from fork into a new task, on exit from
the SWI vector), using calls to syscall_trace. The latter function abuses
the userspace intra-procedure scratch register (regs->ARM_ip, aka r12),
and intends to restore it prior to return to userspace. Unfortunately,
there are cases where we will return to userspace without restoring.
If we are in fact not ptracing but are merely auditing calls, we will
happily trash the content of ip but will exit to userspace without
restoring the value. It just so happens that GLIBC uses ip as a
storage for the TLS thread pointer info, and bad things result.
The fix is simply to have an additional out when not ptracing.
Signed-off-by: Jon Masters <jcm(a)jonmasters.org>
---
Going to assume you forwarded this here because you want it applied to
the Fedora kernel. Likely F17/rawhide?
I'm guessing we probably want to follow
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-April/096951.html
for a bit to see if there are any more iterations of this?
Since it's CC'd to stable, it should get picked up rather quickly if RMK
applies it.
josh