| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set -fvisibility=hidden and explicitly unhide public APIs. This overrides
it with -fvisibility=default for Python because otherwise initseccomp
gets hidden and the module won't load.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
(minor style fixes and macro renames)
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's still possible to pass file descriptors into the Arg data, but safe
uses are already complicated enough that making the user call fileno()
themselves seems reasonable.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
(corrected the python test cases to take into account the change)
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| | |
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Style improvements as well as a wrapper function to select the "best"
hash for a given situation. Some unused functions were also removed.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There is still a lot of style/formatting work that should probably
be done to this file, but this cleans it up enough so it passes our
basic style checks.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Since we have a tool to verify the source code style/formatting, let's
put it to good use.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is far from perfect, but it is something, and it provides an
objective answer to "how do I style my code for this project?".
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch fixes a number of uninitialized memory problems caught by
valgrind. These aren't the typical uninitialized memory issues, but
rather an issue with our block hashing and the structure padding areas
not being init/reset. This isn't something that I expect would have
caused a lot of problems, but they would have been a major
head-scratcher and difficult to reproduce.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Another stupid mistake of mine; we weren't correctly reassigning
a pointer after a successful realloc() in db_col_merge().
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The existing sub-tree pruning was bad, so very bad. It was obviously
broken on 32-bit platforms (our own tests were failing), and somewhat
less obviously broken on 64-bit platforms.
Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
We don't really need to run valgrind multiple times for each test case,
just once should be enough.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| | |
The current tests are not safe for non-native architectures.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| | |
Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
With this patch the test harness returns 0 if there were no errors or
failures detected, positive values if a error or failure was detected.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cython doesn't support docstrings for __cinit__. This change will
(very slightly) slow down construction, but it makes ipython
happer.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The double-quotes around $^ in INSTALL_BIN_MACRO prevented it from being
used to install more than a single binary to INSTALL_BIN_DIR at a time.
Signed-off-by: Joe MacDonald <joe@deserted.net>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Expand on the comments made by Andy Lutomirski.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
It wasn't clear before which datum was the mask and which was the value.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|/
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
| |
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Often we need to resolve syscall numbers into syscall names, add this
functionality to our existing resolver.
Thanks to Eduardo Otubo who originally came up with the idea and
inspired this patch.
Reported-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
| |
Some of the tools are quite handy and would likely be useful for
developers incorporating libseccomp into their applications so let's
go ahead and namespace the tools in preparation for installing them.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The wrong variable name was erroneous failing the function
seccomp_syscall_priority() when trying to set a priority on a negative
(pseudo-syscall) is added.
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
| |
In a previous commit I reordered the bpf_program struct, and in the
process I broke the prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ...)
API. This patch restores the proper bpf_program structure ordering.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the course of development there are often times when we want
to temporarily add a test; to help with this problem, this patch adds
a placeholder for test "00-test" which can be used as a temporary
test case.
In order to use this, simply copy your temporary test case into the
file tests/00-test.c and do the following from the top-level build
directory:
# make clean all
# make -C tests 00-test
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
| |
Shuffle some structure fields to improve packing and cacheline ordering.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
| |
Make it more obvious that these variables are booleans.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This patch corrects a number of problems on 64-bit systems that were
preventing us from correctly comparing the high 32-bit word of a
syscall argument in some cases.
Reported-by: Thiago Marcos P. Santos <tmpsantos@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
bindings
Our Cython code only builds properly on Cython 0.16 or higher so
verify that a proper version of Cython is installed if we are
building the Python bindings.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
| |
We weren't correctly tracking the accumulator state as we built the
BPF code, in an effort to fix this we now store the initial state of
the accumulator along with the BPF instruction block.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
|
|
|
|
| |
Since x86_64 and x32 share the same seccomp filter architecture token
in the kernel we need to do an extra step and verify the syscall
number when checking the architecture.
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|