]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Use FIFO semantics to order notifications
authorSargun Dhillon <sargun@sargun.me>
Thu, 28 Apr 2022 01:54:46 +0000 (18:54 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 29 Apr 2022 18:30:54 +0000 (11:30 -0700)
commit3ccfa1852d639edb18b9e9cd7c85dc2ddab3e97c
treedf273ffd6f69e1fd7f6862a48c36a7002174b5cb
parent886f332c39ddb0e61a55379a79ba89b731df613c
seccomp: Use FIFO semantics to order notifications

Previously, the seccomp notifier used LIFO semantics, where each
notification would be added on top of the stack, and notifications
were popped off the top of the stack. This could result one process
that generates a large number of notifications preventing other
notifications from being handled. This patch moves from LIFO (stack)
semantics to FIFO (queue semantics).

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220428015447.13661-1-sargun@sargun.me
kernel/seccomp.c