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-393-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:18:52 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 392/437] EDAC/altera: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/edac/altera_edac.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index ae17ce4d9722..889722751163 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -115,13 +115,13 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
-static ssize_t altr_sdr_mc_err_inject_write(struct file *file,
-					    const char __user *data,
-					    size_t count, loff_t *ppos)
+static ssize_t altr_sdr_mc_err_inject_write(struct kiocb *iocb,
+					    struct iov_iter *from)
 {
-	struct mem_ctl_info *mci = file->private_data;
+	struct mem_ctl_info *mci = iocb->ki_filp->private_data;
 	struct altr_sdram_mc_data *drvdata = mci->pvt_info;
 	const struct altr_sdram_prv_data *priv = drvdata->data;
+	size_t count = iov_iter_count(from);
 	u32 *ptemp;
 	dma_addr_t dma_handle;
 	u32 reg, read_reg;
@@ -187,7 +187,7 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file,
 
 static const struct file_operations altr_sdr_mc_debug_inject_fops = {
 	.open = simple_open,
-	.write = altr_sdr_mc_err_inject_write,
+	.write_iter = altr_sdr_mc_err_inject_write,
 	.llseek = generic_file_llseek,
 };
 
@@ -640,30 +640,29 @@ altr_edac_device_trig(struct file *file, const char __user *user_buf,
 
 	return count;
 }
+FOPS_WRITE_ITER_HELPER(altr_edac_device_trig);
 
 static const struct file_operations altr_edac_device_inject_fops __maybe_unused = {
 	.open = simple_open,
-	.write = altr_edac_device_trig,
+	.write_iter = altr_edac_device_trig_iter,
 	.llseek = generic_file_llseek,
 };
 
 static ssize_t __maybe_unused
-altr_edac_a10_device_trig(struct file *file, const char __user *user_buf,
-			  size_t count, loff_t *ppos);
+altr_edac_a10_device_trig_iter(struct kiocb *iocb, struct iov_iter *from);
 
 static const struct file_operations altr_edac_a10_device_inject_fops __maybe_unused = {
 	.open = simple_open,
-	.write = altr_edac_a10_device_trig,
+	.write_iter = altr_edac_a10_device_trig_iter,
 	.llseek = generic_file_llseek,
 };
 
 static ssize_t __maybe_unused
-altr_edac_a10_device_trig2(struct file *file, const char __user *user_buf,
-			   size_t count, loff_t *ppos);
+altr_edac_a10_device_trig2_iter(struct kiocb *iocb, struct iov_iter *from);
 
 static const struct file_operations altr_edac_a10_device_inject2_fops __maybe_unused = {
 	.open = simple_open,
-	.write = altr_edac_a10_device_trig2,
+	.write_iter = altr_edac_a10_device_trig2_iter,
 	.llseek = generic_file_llseek,
 };
 
@@ -1760,6 +1759,7 @@ altr_edac_a10_device_trig(struct file *file, const char __user *user_buf,
 
 	return count;
 }
+FOPS_WRITE_ITER_HELPER(altr_edac_a10_device_trig);
 
 /*
  * The Stratix10 EDAC Error Injection Functions differ from Arria10
@@ -1823,6 +1823,7 @@ altr_edac_a10_device_trig2(struct file *file, const char __user *user_buf,
 
 	return count;
 }
+FOPS_WRITE_ITER_HELPER(altr_edac_a10_device_trig2);
 
 static void altr_edac_a10_irq_handler(struct irq_desc *desc)
 {
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ