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]
Date: Thu, 11 Apr 2024 09:19:31 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 431/437] pci: hotplug: cpqphp: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/pci/hotplug/cpqphp_sysfs.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c
index fed1360ee9b1..234e7ab66660 100644
--- a/drivers/pci/hotplug/cpqphp_sysfs.c
+++ b/drivers/pci/hotplug/cpqphp_sysfs.c
@@ -157,11 +157,10 @@ static loff_t lseek(struct file *file, loff_t off, int whence)
 	return fixed_size_llseek(file, off, whence, dbg->size);
 }
 
-static ssize_t read(struct file *file, char __user *buf,
-		    size_t nbytes, loff_t *ppos)
+static ssize_t read(struct kiocb *iocb, struct iov_iter *to)
 {
-	struct ctrl_dbg *dbg = file->private_data;
-	return simple_read_from_buffer(buf, nbytes, ppos, dbg->data, dbg->size);
+	struct ctrl_dbg *dbg = iocb->ki_filp->private_data;
+	return simple_copy_from_iter(dbg->data, &iocb->ki_pos, dbg->size, to);
 }
 
 static int release(struct inode *inode, struct file *file)
@@ -177,7 +176,7 @@ static const struct file_operations debug_ops = {
 	.owner = THIS_MODULE,
 	.open = open,
 	.llseek = lseek,
-	.read = read,
+	.read_iter = read,
 	.release = release,
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ