Add valgrind-3.8.1-ptrace-thread-area.patch

This commit is contained in:
Mark Wielaard 2013-07-08 16:06:59 +02:00
parent 1e328ccc12
commit 05491cda5e
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,58 @@
commit f666d20249ff381dfc9bf5a621c544560527af40
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date: Wed May 22 10:21:08 2013 +0000
Support PTRACE_GET/SET_THREAD_AREA on x86.
BZ#320063. (Josh Stone, jistone@redhat.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13403 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index 7e75899..ed60a15 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1118,6 +1118,10 @@ PRE(sys_ptrace)
PRE_MEM_WRITE( "ptrace(getfpxregs)", ARG4,
sizeof(struct vki_user_fxsr_struct) );
break;
+ case VKI_PTRACE_GET_THREAD_AREA:
+ PRE_MEM_WRITE( "ptrace(get_thread_area)", ARG4,
+ sizeof(struct vki_user_desc) );
+ break;
case VKI_PTRACE_SETREGS:
PRE_MEM_READ( "ptrace(setregs)", ARG4,
sizeof (struct vki_user_regs_struct));
@@ -1130,6 +1134,10 @@ PRE(sys_ptrace)
PRE_MEM_READ( "ptrace(setfpxregs)", ARG4,
sizeof(struct vki_user_fxsr_struct) );
break;
+ case VKI_PTRACE_SET_THREAD_AREA:
+ PRE_MEM_READ( "ptrace(set_thread_area)", ARG4,
+ sizeof(struct vki_user_desc) );
+ break;
case VKI_PTRACE_GETEVENTMSG:
PRE_MEM_WRITE( "ptrace(geteventmsg)", ARG4, sizeof(unsigned long));
break;
@@ -1167,6 +1175,9 @@ POST(sys_ptrace)
case VKI_PTRACE_GETFPXREGS:
POST_MEM_WRITE( ARG4, sizeof(struct vki_user_fxsr_struct) );
break;
+ case VKI_PTRACE_GET_THREAD_AREA:
+ POST_MEM_WRITE( ARG4, sizeof(struct vki_user_desc) );
+ break;
case VKI_PTRACE_GETEVENTMSG:
POST_MEM_WRITE( ARG4, sizeof(unsigned long));
break;
diff --git a/include/vki/vki-x86-linux.h b/include/vki/vki-x86-linux.h
index 7c072d6..adfcb08 100644
--- a/include/vki/vki-x86-linux.h
+++ b/include/vki/vki-x86-linux.h
@@ -812,6 +812,8 @@ struct vki_shminfo64 {
#define VKI_PTRACE_SETFPREGS 15
#define VKI_PTRACE_GETFPXREGS 18
#define VKI_PTRACE_SETFPXREGS 19
+#define VKI_PTRACE_GET_THREAD_AREA 25
+#define VKI_PTRACE_SET_THREAD_AREA 26
//----------------------------------------------------------------------
// From linux-2.6.15.4/include/asm-i386/vm86.h

View File

@ -169,6 +169,9 @@ Patch42: valgrind-3.8.1-ppc-setxattr.patch
# KDE#321738 Add manpages for vgdb and valgrind-listener
Patch43: valgrind-3.8.1-new-manpages.patch
# KDE#320063 Support PTRACE_GET/SET_THREAD_AREA on x86.
Patch44: valgrind-3.8.1-ptrace-thread-area.patch
%ifarch x86_64 ppc64
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
@ -311,6 +314,7 @@ touch ./memcheck/tests/linux/getregset.stderr.exp
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
# These tests go into an endless loop on ARM
# There is a __sync_add_and_fetch in the testcase.
@ -477,6 +481,7 @@ echo ===============END TESTING===============
- Cleanup valgrind-3.8.1-sigill_diag.patch .orig file changes (#949687).
- Add valgrind-3.8.1-ppc-setxattr.patch
- Add valgrind-3.8.1-new-manpages.patch
- Add valgrind-3.8.1-ptrace-thread-area.patch
* Tue May 28 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 1:3.8.1-16
- Provide virtual -static package in -devel subpackage (#609624).