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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 29 Jan 2022 19:50:20 +0700 From: Ammar Faizi <ammarfaizi2@...weeb.org> To: Jens Axboe <axboe@...nel.dk> Cc: Ammar Faizi <ammarfaizi2@...weeb.org>, io-uring Mailing List <io-uring@...r.kernel.org>, netdev Mailing List <netdev@...r.kernel.org>, GNU/Weeb Mailing List <gwml@...weeb.org>, Tea Inside Mailing List <timl@...r.teainside.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Pavel Begunkov <asml.silence@...il.com>, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Nugra <richiisei@...il.com>, Praveen Kumar <kpraveen.lkml@...il.com>, Alviro Iskandar Setiawan <alviro.iskandar@...il.com>, Ammar Faizi <ammarfaizi2@...il.com> Subject: [PATCH for-5.18 v1 2/3] net: Make `move_addr_to_user()` be a non static function To add recvfrom() support for io_uring, we need to call move_addr_to_user() from fs/io_uring.c. This makes move_addr_to_user() be a non static function so we can call it from io_uring. Cc: "David S. Miller" <davem@...emloft.net> Cc: Jakub Kicinski <kuba@...nel.org> Cc: netdev@...r.kernel.org Cc: Nugra <richiisei@...il.com> Cc: Alviro Iskandar Setiawan <alviro.iskandar@...il.com> Signed-off-by: Ammar Faizi <ammarfaizi2@...weeb.org> --- v1: - Add Alviro Iskandar Setiawan to CC list (tester). RFC v4: * No changes * RFC v3: * No changes * RFC v2: - Added Nugra to CC list (tester). --- --- include/linux/socket.h | 2 ++ net/socket.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 8ef26d89ef49..0d0bc1ace50c 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -371,6 +371,8 @@ struct ucred { #define IPX_TYPE 1 extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); +extern int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, + void __user *uaddr, int __user *ulen); extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); struct timespec64; diff --git a/net/socket.c b/net/socket.c index 50cf75730fd7..9bc586ab4e93 100644 --- a/net/socket.c +++ b/net/socket.c @@ -268,8 +268,8 @@ int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *k * specified. Zero is returned for a success. */ -static int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, - void __user *uaddr, int __user *ulen) +int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, + void __user *uaddr, int __user *ulen) { int err; int len; -- 2.32.0
Powered by blists - more mailing lists