From: Elliott Hughes Date: Wed, 6 Apr 2016 21:41:36 +0000 (-0700) Subject: Improve decoding of Android's PR_SET_VMA prctl X-Git-Tag: v4.12~444 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=612368b59e7517a34ff23a319329962b6a25c88c;p=strace 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 (SYS_FUNC(prctl)) [__ANDROID__]: Do not define PR_SET_VMA. * Hard-code PR_SET_VMA_ANON_NAME, the only current sub-option. * xlat/prctl_options.in: Add PR_SET_VMA. --- diff --git a/prctl.c b/prctl.c index 53ee56e3..da7d265b 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 2d0d287f..8c09ee31 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