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

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

diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
index 1d1d1b0e4248..71f444ddc27e 100644
--- a/kernel/kcsan/debugfs.c
+++ b/kernel/kcsan/debugfs.c
@@ -220,14 +220,14 @@ static int debugfs_open(struct inode *inode, struct file *file)
 	return single_open(file, show_info, NULL);
 }
 
-static ssize_t
-debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *off)
+static ssize_t debugfs_write(struct kiocb *iocb, struct iov_iter *from)
 {
 	char kbuf[KSYM_NAME_LEN];
 	char *arg;
+	size_t count = iov_iter_count(from);
 	int read_len = count < (sizeof(kbuf) - 1) ? count : (sizeof(kbuf) - 1);
 
-	if (copy_from_user(kbuf, buf, read_len))
+	if (!copy_from_iter_full(kbuf, read_len, from))
 		return -EFAULT;
 	kbuf[read_len] = '\0';
 	arg = strstrip(kbuf);
@@ -260,9 +260,9 @@ debugfs_write(struct file *file, const char __user *buf, size_t count, loff_t *o
 
 static const struct file_operations debugfs_ops =
 {
-	.read	 = seq_read,
+	.read_iter	 = seq_read_iter,
 	.open	 = debugfs_open,
-	.write	 = debugfs_write,
+	.write_iter	 = debugfs_write,
 	.release = single_release
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ