diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/common.c | 2 | ||||
-rw-r--r-- | common/gluten.h | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/common/common.c b/common/common.c index cd792de..f67f175 100644 --- a/common/common.c +++ b/common/common.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include <stddef.h> #include <stdio.h> #include <string.h> @@ -11,6 +12,7 @@ #include <linux/audit.h> #include <linux/seccomp.h> +#include <linux/limits.h> #include "util.h" #include "common.h" diff --git a/common/gluten.h b/common/gluten.h index 9bd4689..6c0fc25 100644 --- a/common/gluten.h +++ b/common/gluten.h @@ -33,6 +33,7 @@ extern struct seccomp_data anonymous_seccomp_data; #define NO_FIELD block #define NS_NUM sizeof(enum ns_type) +#define GET_BIT(x, i) (((x) & (1UL << (i))) != 0) enum gluten_offset_type { OFFSET_RO_DATA = 0, @@ -113,12 +114,17 @@ struct op_nr { struct gluten_offset no_match; }; +struct syscall_desc { + unsigned nr : 9; + unsigned arg_count : 3; + unsigned has_ret : 1; + unsigned arg_deref : 6; + struct gluten_offset data[]; +}; + struct op_call { - struct gluten_offset nr; - struct gluten_offset args[6]; - struct op_context context; - struct gluten_offset ret; - bool has_ret; + struct gluten_offset syscall; + struct gluten_offset context; }; struct op_block { |