selftests/seccomp: Handle namespace failures gracefully
When running without USERNS or PIDNS the seccomp test would hang since it was waiting forever for the child to trigger the user notification since it seems the glibc() abort handler makes a call to getpid(), which would trap again. This changes the getpid filter to getppid, and makes sure ASSERTs execute to stop from spawning the listener. Reported-by: NShuah Khan <shuah@kernel.org> Fixes: 6a21cc50 ("seccomp: add a return code to trap to userspace") Cc: stable@vger.kernel.org # > 5.0 Signed-off-by: NKees Cook <keescook@chromium.org> Reviewed-by: NTycho Andersen <tycho@tycho.ws> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
Showing
想要评论请 注册 或 登录