From eb76c4be150102e5ddf2f2cf90673d8d7cda9afd Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 6 Dec 2015 15:33:53 +0000 Subject: prctl: add PR_CAP_AMBIENT parser * xlat/pr_cap_ambient.in: New file. * prctl.c: Include "xlat/pr_cap_ambient.h". (SYS_FUNC(prctl)): Handle PR_CAP_AMBIENT. --- prctl.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'prctl.c') diff --git a/prctl.c b/prctl.c index 23c012251..fa16c5c17 100644 --- a/prctl.c +++ b/prctl.c @@ -3,11 +3,12 @@ #include #include "xlat/prctl_options.h" -#include "xlat/pr_unalign_flags.h" +#include "xlat/pr_cap_ambient.h" #include "xlat/pr_mce_kill.h" #include "xlat/pr_mce_kill_policy.h" #include "xlat/pr_set_mm.h" #include "xlat/pr_tsc.h" +#include "xlat/pr_unalign_flags.h" #ifndef TASK_COMM_LEN # define TASK_COMM_LEN 16 @@ -142,6 +143,23 @@ SYS_FUNC(prctl) printxval(cap, tcp->u_arg[1], "CAP_???"); return RVAL_DECODED; + case PR_CAP_AMBIENT: + tprints(", "); + printxval(pr_cap_ambient, tcp->u_arg[1], "PR_CAP_AMBIENT_???"); + switch (tcp->u_arg[1]) { + case PR_CAP_AMBIENT_RAISE: + case PR_CAP_AMBIENT_LOWER: + case PR_CAP_AMBIENT_IS_SET: + tprints(", "); + printxval(cap, tcp->u_arg[2], "CAP_???"); + print_prctl_args(tcp, 3); + break; + default: + print_prctl_args(tcp, 2); + break; + } + return RVAL_DECODED; + case PR_MCE_KILL: tprints(", "); printxval(pr_mce_kill, tcp->u_arg[1], "PR_MCE_KILL_???"); -- cgit v1.2.1