summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2012-03-21 12:35:30 -0400
committerPaul Moore <pmoore@redhat.com>2012-03-21 12:35:30 -0400
commitf746d17df9b5782c9e0227e0ad6113104d04bb68 (patch)
tree5ea331fcc99431f4f732a17f97aa05d0d205596a /tools
parent417fc228c531a5b8947f3663db29b22ed5971547 (diff)
downloadlibseccomp-f746d17df9b5782c9e0227e0ad6113104d04bb68.tar.gz
api: allow a 16bit value to be used with SCMP_ACT_TRACE
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/bpf_disasm.c5
-rw-r--r--tools/bpf_sim.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/bpf_disasm.c b/tools/bpf_disasm.c
index 8dc4d1b..4a21f98 100644
--- a/tools/bpf_disasm.c
+++ b/tools/bpf_disasm.c
@@ -218,8 +218,9 @@ static void bpf_decode_args(const struct bpf_instr *bpf, unsigned int line)
else if ((bpf->k & 0xffff0000) == 0x00030000)
printf("ERRNO(%u)",
(bpf->k & 0x0000ffff));
- else if (bpf->k == 0x7ff00000)
- printf("TRACE");
+ else if ((bpf->k & 0xffff0000) == 0x7ff0000)
+ printf("TRACE(%u)",
+ (bpf->k & 0x0000ffff));
else if (bpf->k == 0x7fff0000)
printf("ALLOW");
else
diff --git a/tools/bpf_sim.c b/tools/bpf_sim.c
index 17c76cc..2d52214 100644
--- a/tools/bpf_sim.c
+++ b/tools/bpf_sim.c
@@ -115,6 +115,8 @@ static void end_action(uint32_t action, unsigned int line)
fprintf(stdout, "TRAP");
else if ((action & 0xffff0000) == 0x00030000)
fprintf(stdout, "ERRNO(%u)", (action & 0x0000ffff));
+ else if ((action & 0xffff0000) == 0x7ff00000)
+ fprintf(stdout, "TRACE(%u)", (action & 0x0000ffff));
else if (action == 0x7fff0000)
fprintf(stdout, "ALLOW");
else