[PATCH v1 net-next 1/4] selftests: landlock: Replace MSG_OOB with O_ASYNC+F_SETSIG.
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 17 02:19:00 UTC 2026
> AF_UNIX will drop MSG_OOB support.
>
> scoped_signal_test.c uses MSG_OOB in fown.sigurg_socket and
> trace_fown.deny_scope_fown to trigger SIGURG and exercise
> security_file_send_sigiotask().
>
> The same hook can be exercised via send_sigio() with a plain send()
> by setting O_ASYNC and F_SETSIG with SIGURG on recv_socket.
>
> Let's replace MSG_OOB with O_ASYNC and F_SETSIG so that the tests
> do not depend on CONFIG_AF_UNIX_OOB.
>
> Note that with O_ASYNC set on recv_socket, closing client_socket
> while recv_socket is still open also triggers SIGURG for POLL_HUP
> in unix_release_sock(), which would emit an extra
> landlock_deny_scope_signal trace event in
> trace_fown.deny_scope_fown. Thus, the child waits for the parent
> to close recv_socket via pipe_parent before closing client_socket.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu at google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116021845.2533130-1-kuniyu@google.com?part=1
More information about the Linux-security-module-archive
mailing list