lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1708412505-34470-2-git-send-email-alibuda@linux.alibaba.com>
Date: Tue, 20 Feb 2024 15:01:26 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com>
To: kgraul@...ux.ibm.com,
	wenjia@...ux.ibm.com,
	jaka@...ux.ibm.com,
	wintera@...ux.ibm.com,
	guwen@...ux.alibaba.com
Cc: kuba@...nel.org,
	davem@...emloft.net,
	netdev@...r.kernel.org,
	linux-s390@...r.kernel.org,
	linux-rdma@...r.kernel.org,
	tonylu@...ux.alibaba.com,
	pabeni@...hat.com,
	edumazet@...gle.com
Subject: [RFC net-next 01/20] net: export partial symbols in inet/inet6 proto_ops

From: "D. Wythe" <alibuda@...ux.alibaba.com>

The following symbols have been exported here

1. inet_compat_ioctl
2. inet6_sendmsg
3. inet6_recvmsg

Exporting these symbols mainly provides the ability for other modules
to directly access these symbols. Currently, all symbols except those
above symbols are exported. So, there mighe be no obvious risk in
exporting these symbols.

Signed-off-by: D. Wythe <alibuda@...ux.alibaba.com>
---
 include/net/inet_common.h | 3 +++
 net/ipv4/af_inet.c        | 3 ++-
 net/ipv6/af_inet6.c       | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/net/inet_common.h b/include/net/inet_common.h
index f50a644..1c2fcca 100644
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -57,6 +57,9 @@ int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
 int inet_getname(struct socket *sock, struct sockaddr *uaddr,
 		 int peer);
 int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
+#ifdef CONFIG_COMPAT
+int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
+#endif
 int inet_ctl_sock_create(struct sock **sk, unsigned short family,
 			 unsigned short type, unsigned char protocol,
 			 struct net *net);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index ad27800..049d135 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1031,7 +1031,7 @@ static int inet_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
 	return ip_rt_ioctl(sock_net(sk), cmd, &rt);
 }
 
-static int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
+int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 {
 	void __user *argp = compat_ptr(arg);
 	struct sock *sk = sock->sk;
@@ -1046,6 +1046,7 @@ static int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned lon
 		return sk->sk_prot->compat_ioctl(sk, cmd, arg);
 	}
 }
+EXPORT_SYMBOL_GPL(inet_compat_ioctl);
 #endif /* CONFIG_COMPAT */
 
 const struct proto_ops inet_stream_ops = {
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 959bfd9..5a81f8b 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -660,6 +660,7 @@ int inet6_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
 	return INDIRECT_CALL_2(prot->sendmsg, tcp_sendmsg, udpv6_sendmsg,
 			       sk, msg, size);
 }
+EXPORT_SYMBOL_GPL(inet6_sendmsg);
 
 INDIRECT_CALLABLE_DECLARE(int udpv6_recvmsg(struct sock *, struct msghdr *,
 					    size_t, int, int *));
@@ -682,6 +683,7 @@ int inet6_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
 		msg->msg_namelen = addr_len;
 	return err;
 }
+EXPORT_SYMBOL_GPL(inet6_recvmsg);
 
 const struct proto_ops inet6_stream_ops = {
 	.family		   = PF_INET6,
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ