seccomp: Selftest for detection of filter flag support
Userspace needs to be able to reliably detect the support of a filter flag. A good way of doing that is by attempting to enter filter mode, with the flag bit(s) in question set, and a NULL pointer for the args parameter of seccomp(2). EFAULT indicates that the flag is valid and EINVAL indicates that the flag is invalid. This patch adds a selftest that can be used to test this method of detection in userspace. Signed-off-by: NTyler Hicks <tyhicks@canonical.com> Signed-off-by: NKees Cook <keescook@chromium.org>
Showing
想要评论请 注册 或 登录