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-180-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:19 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 179/437] drivers/pinctrl: convert to ->read_iter and ->write_iter

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

diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index d924207d629b..c7b229d76d7b 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -675,18 +675,18 @@ void pinmux_show_setting(struct seq_file *s,
 DEFINE_SHOW_ATTRIBUTE(pinmux_functions);
 DEFINE_SHOW_ATTRIBUTE(pinmux_pins);
 
-static ssize_t pinmux_select(struct file *file, const char __user *user_buf,
-				   size_t len, loff_t *ppos)
+static ssize_t pinmux_select(struct kiocb *iocb, struct iov_iter *from)
 {
-	struct seq_file *sfile = file->private_data;
+	struct seq_file *sfile = iocb->ki_filp->private_data;
 	struct pinctrl_dev *pctldev = sfile->private;
 	const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
+	size_t len = iov_iter_count(from);
 	const char *const *groups;
 	char *buf, *gname, *fname;
 	unsigned int num_groups;
 	int fsel, gsel, ret;
 
-	buf = memdup_user_nul(user_buf, len);
+	buf = iterdup_nul(from, len);
 	if (IS_ERR(buf))
 		return PTR_ERR(buf);
 
@@ -758,7 +758,7 @@ static int pinmux_select_open(struct inode *inode, struct file *file)
 static const struct file_operations pinmux_select_ops = {
 	.owner = THIS_MODULE,
 	.open = pinmux_select_open,
-	.write = pinmux_select,
+	.write_iter = pinmux_select,
 	.llseek = no_llseek,
 	.release = single_release,
 };
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ