linux/include
Kees Cook c0029de509 net/scm: Regularize compat handling of scm_detach_fds()
Duplicate the cleanups from commit 2618d530dd ("net/scm: cleanup
scm_detach_fds") into the compat code.

Replace open-coded __receive_sock() with a call to the helper.

Move the check added in commit 1f466e1f15 ("net: cleanly handle kernel
vs user buffers for ->msg_control") to before the compat call, even
though it should be impossible for an in-kernel call to also be compat.

Correct the int "flags" argument to unsigned int to match fd_install()
and similar APIs.

Regularize any remaining differences, including a whitespace issue,
a checkpatch warning, and add the check from commit 6900317f5e ("net,
scm: fix PaX detected msg_controllen overflow in scm_detach_fds") which
fixed an overflow unique to 64-bit. To avoid confusion when comparing
the compat handler to the native handler, just include the same check
in the compat handler.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Sargun Dhillon <sargun@sargun.me>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-07-13 11:03:44 -07:00
..
acpi Merge branch 'acpica' 2020-06-10 17:27:28 +02:00
asm-generic seccomp: Use -1 marker for end of mode 1 syscall list 2020-07-10 16:01:52 -07:00
clocksource
crypto
drm
dt-bindings - qcom : 2020-06-11 12:42:14 -07:00
keys
kunit
kvm
linux seccomp: release filter after task is fully dead 2020-07-10 16:01:51 -07:00
math-emu
media media updates for v5.8-rc1 2020-06-13 13:09:38 -07:00
misc
net net/scm: Regularize compat handling of scm_detach_fds() 2020-07-13 11:03:44 -07:00
pcmcia
ras
rdma
scsi
soc
sound
target scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb() 2020-06-09 21:57:26 -04:00
trace block-5.8-2020-06-11 2020-06-11 16:07:33 -07:00
uapi seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID 2020-07-10 16:01:52 -07:00
vdso
video
xen xen: Move xen_setup_callback_vector() definition to include/xen/hvm.h 2020-06-11 15:15:19 +02:00