From d5368bf3dff2b4627e2d69cce5c5dd98428fdaba Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Mon, 13 May 2019 17:48:16 +0000 Subject: Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions alter the userspace sockaddr to convert the format between linux and BSD versions. That's the minimum 3 of copyin/copyout operations for one syscall. Also some syscall uses linux_sa_put() and linux_getsockaddr() when load sockaddr to userspace or from userspace accordingly. To avoid this chaos, especially converting sockaddr in the userspace, rewrite these 4 functions to convert sockaddr only in kernel and leave only 2 of this functions. Also in order to reduce duplication between MD parts of the Linuxulator put struct sockaddr conversion functions that are MI out into linux_common module. PR: 232920 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20157 --- sys/modules/linux_common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/modules/linux_common/Makefile') diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 940db596a9fee..e8dbbb73ad01d 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -5,7 +5,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ linux_errno.c \ - linux.c device_if.h vnode_if.h bus_if.h + linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h EXPORT_SYMS= EXPORT_SYMS+= linux_emul_path -- cgit v1.3