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-194-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:33 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 193/437] scsi: qedi: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/scsi/qedi/qedi_dbg.h     |  6 +++---
 drivers/scsi/qedi/qedi_debugfs.c | 20 ++++++++++++++++----
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h
index fdda12ef13b0..2b05de656aa8 100644
--- a/drivers/scsi/qedi/qedi_dbg.h
+++ b/drivers/scsi/qedi/qedi_dbg.h
@@ -114,8 +114,8 @@ struct qedi_debugfs_ops {
 { \
 	.owner  = THIS_MODULE, \
 	.open   = simple_open, \
-	.read   = drv##_dbg_##ops##_cmd_read, \
-	.write  = drv##_dbg_##ops##_cmd_write \
+	.read_iter   = drv##_dbg_##ops##_cmd_read, \
+	.write_iter  = drv##_dbg_##ops##_cmd_write \
 }
 
 /* Used for debugfs sequential files */
@@ -123,7 +123,7 @@ struct qedi_debugfs_ops {
 { \
 	.owner = THIS_MODULE, \
 	.open = drv##_dbg_##ops##_open, \
-	.read = seq_read, \
+	.read_iter = seq_read_iter, \
 	.llseek = seq_lseek, \
 	.release = single_release, \
 }
diff --git a/drivers/scsi/qedi/qedi_debugfs.c b/drivers/scsi/qedi/qedi_debugfs.c
index 8deb2001dc2f..28fbbea694d5 100644
--- a/drivers/scsi/qedi/qedi_debugfs.c
+++ b/drivers/scsi/qedi/qedi_debugfs.c
@@ -91,8 +91,8 @@ const struct qedi_debugfs_ops qedi_debugfs_ops[] = {
 };
 
 static ssize_t
-qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer,
-				  size_t count, loff_t *ppos)
+__qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer,
+				    size_t count, loff_t *ppos)
 {
 	size_t cnt = 0;
 	struct qedi_dbg_ctx *qedi_dbg =
@@ -117,8 +117,14 @@ qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer,
 }
 
 static ssize_t
-qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
-				 size_t count, loff_t *ppos)
+qedi_dbg_do_not_recover_cmd_write(struct kiocb *iocb, struct iov_iter *from)
+{
+	return vfs_write_iter(iocb, from, __qedi_dbg_do_not_recover_cmd_write);
+}
+
+static ssize_t
+__qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
+				   size_t count, loff_t *ppos)
 {
 	size_t cnt = 0;
 
@@ -131,6 +137,12 @@ qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
 	return cnt;
 }
 
+static ssize_t
+qedi_dbg_do_not_recover_cmd_read(struct kiocb *iocb, struct iov_iter *to)
+{
+	return vfs_read_iter(iocb, to, __qedi_dbg_do_not_recover_cmd_read);
+}
+
 static int
 qedi_gbl_ctx_show(struct seq_file *s, void *unused)
 {
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ