Before:
prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096,
"atexit handlers") = 0
After:
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096,
"atexit handlers") = 0
* prctl.c: hard-code PR_SET_VMA_ANON_NAME, the only current sub-option.
* xlat/prctl_options.in: add the PR_SET_VMA constant.
---
prctl.c | 6 +-----
xlat/prctl_options.in | 1 +
2 files changed, 2 insertions(+), 5 deletions(-)
From 347bf4eaa1ad030200958a69007bbdc34ff8a0fc Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Wed, 6 Apr 2016 14:41:36 -0700
Subject: [PATCH] Improve decoding of Android's PR_SET_VMA prctl.
Before:
prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096,
"atexit handlers") = 0
After:
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096,
"atexit handlers") = 0
* prctl.c: hard-code PR_SET_VMA_ANON_NAME, the only current sub-option.
* xlat/prctl_options.in: add the PR_SET_VMA constant.
---
prctl.c | 6 +-----
xlat/prctl_options.in | 1 +
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/prctl.c b/prctl.c
index 53ee56e..da7d265 100644
--- a/prctl.c
+++ b/prctl.c
@@ -208,16 +208,12 @@ SYS_FUNC(prctl)
return RVAL_DECODED;
#ifdef __ANDROID__
-# ifndef PR_SET_VMA
-# define PR_SET_VMA 0x53564d41
-# endif
# ifndef PR_SET_VMA_ANON_NAME
# define PR_SET_VMA_ANON_NAME 0
# endif
case PR_SET_VMA:
if (tcp->u_arg[1] == PR_SET_VMA_ANON_NAME) {
- tprintf(", %lu", tcp->u_arg[1]);
- tprintf(", %#lx", tcp->u_arg[2]);
+ tprintf(", PR_SET_VMA_ANON_NAME, %#lx", tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[3]);
printstr(tcp, tcp->u_arg[4], -1);
} else {
diff --git a/xlat/prctl_options.in b/xlat/prctl_options.in
index 2d0d287..8c09ee3 100644
--- a/xlat/prctl_options.in
+++ b/xlat/prctl_options.in
@@ -44,3 +44,4 @@ PR_MPX_DISABLE_MANAGEMENT 44
PR_SET_FP_MODE 45
PR_GET_FP_MODE 46
PR_CAP_AMBIENT 47
+PR_SET_VMA 0x53564d41
--
2.8.0.rc3.226.g39d4020
------------------------------------------------------------------------------
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel