Skip to content

Commit c157b43

Browse files
author
sewardj
committed
Correctly handle prctl(VKI_PR_SET_PTRACER, ..) so as to avoid false
positives (eg when running Wine). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14946 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 parent dfb58e2 commit c157b43

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

coregrind/m_syswrap/syswrap-linux.c

+3
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,9 @@ PRE(sys_prctl)
10151015
case VKI_PR_SET_ENDIAN:
10161016
PRE_REG_READ2(int, "prctl", int, option, int, value);
10171017
break;
1018+
case VKI_PR_SET_PTRACER:
1019+
PRE_REG_READ2(int, "prctl", int, option, int, ptracer_process_ID);
1020+
break;
10181021
default:
10191022
PRE_REG_READ5(long, "prctl",
10201023
int, option, unsigned long, arg2, unsigned long, arg3,

include/vki/vki-linux.h

+1
Original file line numberDiff line numberDiff line change
@@ -2506,6 +2506,7 @@ struct vki_vt_consize {
25062506
# define VKI_PR_ENDIAN_BIG 0
25072507
# define VKI_PR_ENDIAN_LITTLE 1 /* True little endian mode */
25082508
# define VKI_PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */
2509+
#define VKI_PR_SET_PTRACER 0x59616d61
25092510

25102511
//----------------------------------------------------------------------
25112512
// From linux-2.6.19/include/linux/usbdevice_fs.h

0 commit comments

Comments
 (0)