]> Git Repo - linux.git/commit
seccomp: Refactor notification handler to prepare for new semantics
authorSargun Dhillon <[email protected]>
Mon, 17 May 2021 19:39:06 +0000 (12:39 -0700)
committerKees Cook <[email protected]>
Sat, 29 May 2021 18:13:27 +0000 (11:13 -0700)
commitddc473916955f7710d1eb17c1273d91c8622a9fe
tree8f61a3077ef4e5a4310c4d19731fc7daa522d7cf
parentaac902925ea646e461c95edc98a8a57eb0def917
seccomp: Refactor notification handler to prepare for new semantics

This refactors the user notification code to have a do / while loop around
the completion condition. This has a small change in semantic, in that
previously we ignored addfd calls upon wakeup if the notification had been
responded to, but instead with the new change we check for an outstanding
addfd calls prior to returning to userspace.

Rodrigo Campos also identified a bug that can result in addfd causing
an early return, when the supervisor didn't actually handle the
syscall [1].

[1]: https://lore.kernel.org/lkml/20210413160151[email protected]/

Fixes: 7cf97b125455 ("seccomp: Introduce addfd ioctl to seccomp user notifier")
Signed-off-by: Sargun Dhillon <[email protected]>
Acked-by: Tycho Andersen <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Tested-by: Rodrigo Campos <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
kernel/seccomp.c
This page took 0.054165 seconds and 4 git commands to generate.