aboutgitcodelistschat:MatrixIRC
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* ops: check for SECCOMP_DATAAlice Frosi2023-05-101-0/+3
| | | | Add check if offset type is SECCOMP_DATA and the seccomp request is set.
* Refactoring of gluten_read/writeAlice Frosi2023-05-101-26/+34
| | | | | | | | Refactor includes: - use static inline instead of macro - return -1 if there is an error and don't exit - eval return 0 or -1 - adjust code and tests
* gluten: check limitsAlice Frosi2023-05-091-3/+45
| | | | | | Add bounds checking: - if offset is larger then the maximum per offset type - if memcpy is reading/writing inside gluten
* seitan: refactor operationsAlice Frosi2023-05-081-25/+21
| | | | | | | | | | | Refactoring: - rename do_operations to eval and reduce the number of arguments - create macro HANDLE_OP - rename all functions with op_*(operation name) - exposed the op_* functions in the operations.h Fixes: - use pread for op_load
* cooker updates spilling all over the placeStefano Brivio2023-05-022-30/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add op_cmp typeAlice Frosi2023-04-211-0/+10
|
* Create common function to install the BPF filterAlice Frosi2023-03-302-1/+33
|
* Move util.h and util.c in commonAlice Frosi2023-03-242-0/+51
|
* Re-arrange repository structureAlice Frosi2023-03-243-0/+195