From: Dmitry V. Levin Date: Sun, 6 Dec 2015 15:29:04 +0000 (+0000) Subject: prctl: finish decoding of several commands on entering syscall X-Git-Tag: v4.11~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b283307d1a6ffbeb14aa8f76f85ddf506c568de;p=strace prctl: finish decoding of several commands on entering syscall * prctl.c (SYS_FUNC(prctl)): Return RVAL_DECODED after decoding of PR_GET_DUMPABLE, PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, PR_GET_TIMING, and PR_CAPBSET_READ commands. --- diff --git a/prctl.c b/prctl.c index cfd117f1..23c01225 100644 --- a/prctl.c +++ b/prctl.c @@ -53,9 +53,7 @@ SYS_FUNC(prctl) case PR_GET_SECCOMP: case PR_GET_TIMERSLACK: case PR_GET_TIMING: - if (entering(tcp)) - break; - return syserror(tcp) ? 0 : RVAL_UDECIMAL; + return RVAL_DECODED; case PR_GET_CHILD_SUBREAPER: case PR_GET_ENDIAN: @@ -139,18 +137,11 @@ SYS_FUNC(prctl) return RVAL_DECODED; case PR_CAPBSET_DROP: + case PR_CAPBSET_READ: tprints(", "); printxval(cap, tcp->u_arg[1], "CAP_???"); return RVAL_DECODED; - case PR_CAPBSET_READ: - if (entering(tcp)) { - tprints(", "); - printxval(cap, tcp->u_arg[1], "CAP_???"); - break; - } - return syserror(tcp) ? 0 : RVAL_UDECIMAL; - case PR_MCE_KILL: tprints(", "); printxval(pr_mce_kill, tcp->u_arg[1], "PR_MCE_KILL_???"); @@ -250,14 +241,6 @@ SYS_FUNC(prctl) print_prctl_args(tcp, 2); return RVAL_DECODED; - case PR_GET_NO_NEW_PRIVS: - case PR_GET_THP_DISABLE: - if (entering(tcp)) { - print_prctl_args(tcp, 1); - return 0; - } - return syserror(tcp) ? 0 : RVAL_UDECIMAL; - case PR_MCE_KILL_GET: if (entering(tcp)) { print_prctl_args(tcp, 1); @@ -268,6 +251,8 @@ SYS_FUNC(prctl) tcp->auxstr = xlookup(pr_mce_kill_policy, tcp->u_rval); return tcp->auxstr ? RVAL_STR : RVAL_UDECIMAL; + case PR_GET_NO_NEW_PRIVS: + case PR_GET_THP_DISABLE: case PR_MPX_DISABLE_MANAGEMENT: case PR_MPX_ENABLE_MANAGEMENT: default: