Skip to content

Commit

Permalink
seccompiler: rename arg_index and arg_type
Browse files Browse the repository at this point in the history
In the JSON format, the `args` property maps to a vector
of SeccompConditions, which has fields for arg index and
arg type, among others.

Renamed the arg_index to index and arg_type to type, since
the naming was a little redundant.

This is the proposed version in the rust-vmm seccompiler
crate.

Signed-off-by: alindima <alindima@amazon.com>
  • Loading branch information
alindima authored and acatangiu committed Jul 5, 2021
1 parent 9ca13a9 commit 74c800f
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 248 deletions.
8 changes: 4 additions & 4 deletions docs/seccompiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ Note that, when passing the deprecated `--basic` flag to seccompiler-bin, all

A **condition object** is made up of the following mandatory properties:

- `arg_index` (0-based index of the syscall argument we want to check)
- `arg_type` (`dword` or `qword`, which specifies the argument size - 4 or 8
- `index` (0-based index of the syscall argument we want to check)
- `type` (`dword` or `qword`, which specifies the argument size - 4 or 8
bytes respectively)
- `op`, which is one of `eq, ge, gt, ge, lt, masked_eq, ne` (the operator used
for comparing the parameter to `val`)
Expand All @@ -155,8 +155,8 @@ value, much like when using named parameters, like so:
"syscall": "accept4",
"args": [
{
"arg_index": 3,
"arg_type": "dword",
"index": 3,
"type": "dword",
"op": "eq",
"val": 1,
"comment": "libc::AF_UNIX"
Expand Down
Loading

0 comments on commit 74c800f

Please sign in to comment.