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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-178-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:17 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 177/437] soc: mediatek: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/soc/mediatek/mtk-svs.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index c832f5c670bc..49e687a96aa0 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -149,7 +149,7 @@ static DEFINE_SPINLOCK(svs_lock);
 	static const struct file_operations svs_##name##_debug_fops = {	\
 		.owner = THIS_MODULE,					\
 		.open = svs_##name##_debug_open,			\
-		.read = seq_read,					\
+		.read_iter = seq_read_iter,				\
 		.llseek = seq_lseek,					\
 		.release = single_release,				\
 	}
@@ -164,8 +164,8 @@ static DEFINE_SPINLOCK(svs_lock);
 	static const struct file_operations svs_##name##_debug_fops = {	\
 		.owner = THIS_MODULE,					\
 		.open = svs_##name##_debug_open,			\
-		.read = seq_read,					\
-		.write = svs_##name##_debug_write,			\
+		.read_iter = seq_read_iter,				\
+		.write_iter = svs_##name##_debug_write,			\
 		.llseek = seq_lseek,					\
 		.release = single_release,				\
 	}
@@ -782,19 +782,18 @@ static int svs_enable_debug_show(struct seq_file *m, void *v)
 	return 0;
 }
 
-static ssize_t svs_enable_debug_write(struct file *filp,
-				      const char __user *buffer,
-				      size_t count, loff_t *pos)
+static ssize_t svs_enable_debug_write(struct kiocb *iocb, struct iov_iter *from)
 {
-	struct svs_bank *svsb = file_inode(filp)->i_private;
+	struct svs_bank *svsb = file_inode(iocb->ki_filp)->i_private;
 	struct svs_platform *svsp = dev_get_drvdata(svsb->dev);
+	size_t count = iov_iter_count(from);
 	int enabled, ret;
 	char *buf = NULL;
 
 	if (count >= PAGE_SIZE)
 		return -EINVAL;
 
-	buf = (char *)memdup_user_nul(buffer, count);
+	buf = iterdup_nul(from, count);
 	if (IS_ERR(buf))
 		return PTR_ERR(buf);
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ