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-73-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:13:32 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 072/437] kernel/fail_function: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 kernel/fail_function.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/fail_function.c b/kernel/fail_function.c
index d971a0189319..de35a346899c 100644
--- a/kernel/fail_function.c
+++ b/kernel/fail_function.c
@@ -233,9 +233,9 @@ static void fei_attr_remove_all(void)
 	}
 }
 
-static ssize_t fei_write(struct file *file, const char __user *buffer,
-			 size_t count, loff_t *ppos)
+static ssize_t fei_write(struct kiocb *iocb, struct iov_iter *from)
 {
+	size_t count = iov_iter_count(from);
 	struct fei_attr *attr;
 	unsigned long addr;
 	char *buf, *sym;
@@ -245,7 +245,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
 	if (count > KSYM_NAME_LEN)
 		count = KSYM_NAME_LEN;
 
-	buf = memdup_user_nul(buffer, count);
+	buf = iterdup_nul(from, count);
 	if (IS_ERR(buf))
 		return PTR_ERR(buf);
 
@@ -306,8 +306,8 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,
 
 static const struct file_operations fei_ops = {
 	.open =		fei_open,
-	.read =		seq_read,
-	.write =	fei_write,
+	.read_iter =	seq_read_iter,
+	.write_iter =	fei_write,
 	.llseek =	seq_lseek,
 	.release =	seq_release,
 };
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ