]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86-64, compat: Retruncate rax after ia32 syscall entry tracing
authorRoland McGrath <roland@redhat.com>
Tue, 14 Sep 2010 19:22:58 +0000 (12:22 -0700)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:49 +0000 (18:07 -0500)
commit8a8bcc90350488ded5540d93a80afbea27be528b
treec236cda725bbf9bd35ea6c50f0f6c0e53ec3ce54
parent92d8c047c17986afef182f22b9a95a2835aadb54
x86-64, compat: Retruncate rax after ia32 syscall entry tracing

commit eefdca043e8391dcd719711716492063030b55ac upstream.

In commit d4d6715, we reopened an old hole for a 64-bit ptracer touching a
32-bit tracee in system call entry.  A %rax value set via ptrace at the
entry tracing stop gets used whole as a 32-bit syscall number, while we
only check the low 32 bits for validity.

Fix it by truncating %rax back to 32 bits after syscall_trace_enter,
in addition to testing the full 64 bits as has already been added.

Reported-by: Ben Hawkes <hawkes@sota.gen.nz>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
arch/x86/ia32/ia32entry.S