selftests/seccomp: Ensure that notifications come in FIFO order
authorSargun Dhillon <sargun@sargun.me>
Thu, 28 Apr 2022 01:54:47 +0000 (18:54 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 29 Apr 2022 18:49:18 +0000 (11:49 -0700)
commit662340ef921828507c931da6db303fa3cb02228e
tree1bad1b5777627e54c20a156ef829d9249d364409
parent4cbf6f621150e4fca78543067260f68fab0ee328
selftests/seccomp: Ensure that notifications come in FIFO order

When multiple notifications are waiting, ensure they show up in order, as
defined by the (predictable) seccomp notification ID. This ensures FIFO
ordering of notification delivery as notification ids are monitonic and
decided when the notification is generated (as opposed to received).

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Cc: linux-kselftest@vger.kernel.org
Acked-by: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220428015447.13661-2-sargun@sargun.me
tools/testing/selftests/seccomp/seccomp_bpf.c