You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpf: pfc: Add maximum supported kernel version logic
Add support for an application to specify the maximum kernel version it
currently supports. Any syscalls that have been added to a kernel
version newer than this specified version will return the unknown
action. The unknown action defaults to returning ENOSYS, but it can be
overridden via the filter attribute SCMP_FLTATR_ACT_ENOSYS.
When the maximum supported kernel version is enabled, libseccomp will
create a filter as follows:
* Users explicitly declare rules for syscalls. No changes here
from previous behavior
* The default action provided via seccomp_init() will still be
used for all syscalls that existed as of the user-specified
supported kernel
* Any syscalls that did not exist at the time of the
user-specified supported kernel will return the unknown
action. By default libseccomp sets this to return ENOSYS, but
it can be overridden via the filter attribute
SCMP_FLTATR_ACT_ENOSYS.
Below is a rough pseudo-code outline of a typical usage of this feature:
seccomp_init()
seccomp_add_rules()
(optional but recommended) seccomp_attr_set( binary tree )
seccomp_attr_set( max supported kernel version, e.g. SCMP_KV_6_5 )
(optional) seccomp_attr_set( default unknown action )
seccomp_load()
seccomp_release()
Fixes: #11
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
0 commit comments