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-344-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:18:03 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 343/437] s390: hmcdrv: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/s390/char/hmcdrv_dev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/char/hmcdrv_dev.c b/drivers/s390/char/hmcdrv_dev.c
index 8d50c894711f..df793008a390 100644
--- a/drivers/s390/char/hmcdrv_dev.c
+++ b/drivers/s390/char/hmcdrv_dev.c
@@ -56,10 +56,8 @@ struct hmcdrv_dev_node {
 static int hmcdrv_dev_open(struct inode *inode, struct file *fp);
 static int hmcdrv_dev_release(struct inode *inode, struct file *fp);
 static loff_t hmcdrv_dev_seek(struct file *fp, loff_t pos, int whence);
-static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf,
-			       size_t len, loff_t *pos);
-static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
-				size_t len, loff_t *pos);
+static ssize_t hmcdrv_dev_read_iter(struct kiocb *iocb, struct iov_iter *to);
+static ssize_t hmcdrv_dev_write_iter(struct kiocb *iocb, struct iov_iter *from);
 static ssize_t hmcdrv_dev_transfer(char __kernel *cmd, loff_t offset,
 				   char __user *buf, size_t len);
 
@@ -70,8 +68,8 @@ static const struct file_operations hmcdrv_dev_fops = {
 	.open = hmcdrv_dev_open,
 	.llseek = hmcdrv_dev_seek,
 	.release = hmcdrv_dev_release,
-	.read = hmcdrv_dev_read,
-	.write = hmcdrv_dev_write,
+	.read_iter = hmcdrv_dev_read_iter,
+	.write_iter = hmcdrv_dev_write_iter,
 };
 
 static struct hmcdrv_dev_node hmcdrv_dev; /* HMC device struct (static) */
@@ -239,6 +237,7 @@ static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf,
 
 	return retlen;
 }
+FOPS_READ_ITER_HELPER(hmcdrv_dev_read);
 
 /*
  * write()
@@ -276,6 +275,7 @@ static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
 
 	return retlen;
 }
+FOPS_WRITE_ITER_HELPER(hmcdrv_dev_write);
 
 /**
  * hmcdrv_dev_init() - creates a HMC drive CD/DVD device
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ