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

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

diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c
index cc8237afeffa..b6a8e99f0d31 100644
--- a/drivers/s390/char/tape_char.c
+++ b/drivers/s390/char/tape_char.c
@@ -32,8 +32,8 @@
 /*
  * file operation structure for tape character frontend
  */
-static ssize_t tapechar_read(struct file *, char __user *, size_t, loff_t *);
-static ssize_t tapechar_write(struct file *, const char __user *, size_t, loff_t *);
+static ssize_t tapechar_read_iter(struct kiocb *iocb, struct iov_iter *to);
+static ssize_t tapechar_write_iter(struct kiocb *iocb, struct iov_iter *from);
 static int tapechar_open(struct inode *,struct file *);
 static int tapechar_release(struct inode *,struct file *);
 static long tapechar_ioctl(struct file *, unsigned int, unsigned long);
@@ -44,8 +44,8 @@ static long tapechar_compat_ioctl(struct file *, unsigned int, unsigned long);
 static const struct file_operations tape_fops =
 {
 	.owner = THIS_MODULE,
-	.read = tapechar_read,
-	.write = tapechar_write,
+	.read_iter = tapechar_read_iter,
+	.write_iter = tapechar_write_iter,
 	.unlocked_ioctl = tapechar_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl = tapechar_compat_ioctl,
@@ -179,6 +179,7 @@ tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos)
 	tape_free_request(request);
 	return rc;
 }
+FOPS_READ_ITER_HELPER(tapechar_read);
 
 /*
  * Tape device write function
@@ -263,6 +264,7 @@ tapechar_write(struct file *filp, const char __user *data, size_t count, loff_t
 
 	return rc ? rc : written;
 }
+FOPS_WRITE_ITER_HELPER(tapechar_write);
 
 /*
  * Character frontend tape device open function.
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ