aboutgitcodelistschat:MatrixIRC
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fix makefile for debug targetAlice Frosi2023-07-041-0/+3
|
* Makefile: Fix buildStefano Brivio2023-06-141-1/+1
| | | | Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* treewide: Change to GPLv2, add LICENSES, missing headersStefano Brivio2023-06-041-1/+1
| | | | | | As discussed with Alice -- 'reuse lint' passes now. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* ops: adjust op_callAlice Frosi2023-06-011-1/+1
|
* cooker updates spilling all over the placeStefano Brivio2023-05-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only tangentially related: - make seitan C99 again, so that I can build cooker without warnings - make Makefiles make use of the usual conventions about assigning directory paths in variables, drop numbers.h as requirement for cooker and make it convenient to run stand-alone Makefiles - fix up nr_syscalls.sh to be POSIX, otherwise it will give syntax errors on my system - define a single, common way to refer to offsets in gluten, and functions to use those offsets in a safe way. Immediates are gone: cooker will write any bit of "data" to the read-only section - call const what has to be const - define on-disk layout for gluten - add OP_NR (to check syscall numbers), rename OP_COPY_ARGS to OP_LOAD (it loads _selected_ stuff from arguments) As for cooker itself: - drop ARG_ and arg_ prefixes from struct names, and similar - add/rework functions to build OP_NR, OP_LOAD, OP_CMP, and to write constant data to gluten - add parsing for "compound" arguments, but that's not completely hooked into evaluation for numeric arguments yet Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* seitan: use functions from util.hAlice Frosi2023-04-251-1/+1
|
* Makefile: fix compilation for cooker for missing numbers.hAlice Frosi2023-04-181-2/+2
|
* Rename cooker and eater with seitan prefixAlice Frosi2023-03-281-2/+4
|
* Add missing pre-requirement to seitan targetAlice Frosi2023-03-241-1/+1
|
* Replace errExit with dieAlice Frosi2023-03-241-1/+2
|
* Re-arrange repository structureAlice Frosi2023-03-241-9/+16
|
* Re-organize project and add license headerAlice Frosi2023-03-241-29/+27
|
* filter: add logging modeAlice Frosi2023-03-231-2/+2
| | | | | The logging mode creates a BPF filter where all the syscalls trigger a notification to the seccomp notifier.
* makefile: add variable to set temporary data sizeAlice Frosi2023-02-211-0/+1
|
* integration: create integration testsAlice Frosi2023-02-151-0/+9
| | | | | | | | | | | | | Create initial pytest suite for testing seitan and seitan-eater setup. The test suite includes: - 'test_simple' verifies the basic functionalities and the synchronization between seitan and the eater - 'test_restart_seitan' verifies when steitan needs to restart Seitan and eater are deployed in a container to control the environment where they run. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* eater: unset O_CLOEXEC for the seccomp notifier fdAlice Frosi2023-02-151-2/+2
| | | | | | | | Preserve the seccomp notifier fd after the exec. In this way, if seitan needs to restat is able to retrive the fd from /proc/<pid>/fd of the target. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* seitan: separate function in commonAlice Frosi2023-02-151-2/+2
| | | | | | | Move find_fd_seccomp_notifier to common.c to be reused in other places. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Remove t.outAlice Frosi2023-01-171-3/+2
| | | | | | The action file needs to be set from the seitan command line. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Rename loader to eaterAlice Frosi2023-01-161-4/+4
| | | | Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Remove filter.h and t.out rulesAlice Frosi2022-12-211-6/+0
| | | | Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Add unit tests for the BPF filter generationAlice Frosi2022-12-211-0/+5
| | | | | | | | | | | | | | The test-filter verifies that the create_bfp_program builds the filter correctly. The test suite includes the tests for checking a filter with: * a single instruction * a single instruction with arguments * 2 instructions * multiple instructions * multiple instructions with arguments * multiple instructions with multiple instance of the same instruction Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Create bpf_dbg program to disassemble BPF filtersAlice Frosi2022-12-211-0/+3
| | | | | | | | | | | | | | | | | The bpf_dbg binary prints the instructions included in the BPF filter. This is particurarly useful for debugging and verifing the generated filter. E.g: ./bpf_dbg test.bpf Read 7 entries l0: ld [4] l1: jeq #0xc000003e, l2, l5 l2: ld [0] l3: jeq #0x2a, l4, l5 l4: ja 5 l5: ret #0x7fff0000 l6: ret #0x7fc00000 Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Remove build of bpf.outAlice Frosi2022-12-211-4/+1
| | | | Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Generation of bpf programAlice Frosi2022-12-211-2/+2
| | | | | | | | | | | | | | | | | The build binary creates the bpf filter based on the syscalls defined in struct bpf_call. E.g: ./build test.bpf First, a table with the filtered syscalls is built in ascending order of syscall number and including the amount of syscalls of that type. After, the BPF filter with a binary search tree is constructed with: 1. the nodes for the tree search 2. the leaves with all the syscall numbers 3. every syscall arguments if present Then, the BPF instructions are written in the input file. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Remove unecessary flagsAlice Frosi2022-12-211-3/+1
| | | | | | The flags aren't necessary anymore as the filter is built at runtime. Signed-off-by: Alice Frosi <afrosi@redhat.com>
* Generate syscalls numbers with nr_syscalls.shAlice Frosi2022-12-211-2/+2
| | | | | | | | | Refactor filter.sh script by: * renaming the filter.sh to nr_syscalls.sh * removing the BPF filter generation * simplifying the syscall number and header generation Signed-off-by: Alice Frosi <afrosi@redhat.com>
* seitan: Initial importStefano Brivio2022-10-251-0/+44
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>