linux/arch/sparc/include/uapi/asm
Jori Koolstra fd8756fa14 net: af_unix: useful handling of LSM denials on SCM_RIGHTS
Right now if some LSM such as Smack denies an AF_UNIX socket peer to
receive an SCM_RIGHTS fd, the SCM_RIGHTS fd array will be cut short at
that point, and MSG_CTRUNC is set on return of recvmsg(). This is
highly problematic behaviour, because it leaves the receiver
wondering what happened. As per man page MSG_CTRUNC is supposed to
indicate that the control buffer was sized too short, but suddenly
a permission error might result in the exact same flag being set.
Moreover, the receiver has no chance to determine how many fds got
originally sent and how many were suppressed.[1]

Add a SO_RIGHTS_NOTRUNC option to UNIX sockets to enable more useful
handling of LSM denials when receiving SCM_RIGHTS messages: instead of
truncating the message at the first blocked fd, keep every fd slot
and store the LSM errno in the blocked slot. The socket option is
inherited by the child accept() socket if set on the listen() socket.

[1]: https://github.com/uapi-group/kernel-features#useful-handling-of-lsm-denials-on-scm_rights

Reviewed-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20260813162818.149248-4-jkoolstra@xs4all.nl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17 18:14:52 -07:00
..
apc.h
asi.h sparc64: Add support for ADI register fields, ASIs and traps 2018-03-18 07:38:45 -07:00
auxvec.h sparc: Make auxiliary vectors for ADI available on 32-bit as well 2018-03-20 11:14:31 -04:00
bitsperlong.h
byteorder.h
display7seg.h
envctrl.h
errno.h openat2: introduce EFTYPE error code 2026-05-21 10:53:41 +02:00
fbio.h
fcntl.h vfs: uapi: retire octal and hex numbers in favor of (1 << n) for O_ flags 2026-06-06 15:34:03 +02:00
ioctl.h
ioctls.h sparc: don't reference obsolete termio struct for TC* constants 2026-02-06 15:15:53 +01:00
ipcbuf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2020-01-30 07:36:43 -08:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
mman.h mm/mmap: move common defines to mman-common.h 2019-07-16 19:23:25 -07:00
msgbuf.h arch: msgbuf.h: make uapi asm/msgbuf.h self-contained 2019-12-04 19:44:14 -08:00
openpromio.h sparc: openpromio: Address -Warray-bounds warning 2023-07-12 13:24:20 -06:00
oradax.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
param.h
perfctr.h
poll.h
posix_types.h arch: sparc: Override struct __kernel_old_timeval 2019-02-03 11:17:30 -08:00
psr.h
psrcompat.h
pstate.h sparc64: Add support for ADI register fields, ASIs and traps 2018-03-18 07:38:45 -07:00
ptrace.h sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 2025-09-26 17:06:09 +02:00
resource.h
sembuf.h arch: sembuf.h: make uapi asm/sembuf.h self-contained 2019-12-04 19:44:14 -08:00
setup.h
shmbuf.h shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage 2022-02-17 09:09:37 +01:00
sigcontext.h
siginfo.h signal/sparc: si_trapno is only used with SIGILL ILL_ILLTRP 2021-07-23 13:08:57 -05:00
signal.h sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 2025-09-26 17:06:09 +02:00
socket.h net: af_unix: useful handling of LSM denials on SCM_RIGHTS 2026-08-17 18:14:52 -07:00
stat.h sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h 2022-06-02 17:38:15 +02:00
swab.h
termbits.h sparc: move struct termio to asm/termios.h 2024-04-22 15:33:06 +02:00
termios.h sparc: move struct termio to asm/termios.h 2024-04-22 15:33:06 +02:00
traps.h sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 2025-09-26 17:06:09 +02:00
ucontext.h sparc: uapi: Add ucontext.h 2026-06-12 13:50:01 +02:00
uctx.h
unistd.h sparc: generate uapi header and system call table files 2018-11-18 18:52:22 -08:00
utrap.h sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 2025-09-26 17:06:09 +02:00
watchdog.h