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: <20250121110756.214714-2-billy_tsai@aspeedtech.com>
Date: Tue, 21 Jan 2025 19:07:56 +0800
From: Billy Tsai <billy_tsai@...eedtech.com>
To: <alexandre.belloni@...tlin.com>, <pgaj@...ence.com>,
	<miquel.raynal@...tlin.com>, <conor.culhane@...vaco.com>,
	<aniketmaurya@...gle.com>, <billy_tsai@...eedtech.com>,
	<Shyam-sundar.S-k@....com>, <jarkko.nikula@...ux.intel.com>,
	<wsa+renesas@...g-engineering.com>, <xiaopei01@...inos.cn>,
	<Guruvendra.Punugupati@....com>, <linux-i3c@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH v1 2/2] i3c: mipi-i3c-hci: Use DMA-safe buffer for I2C transfers

The i2c_get_dma_safe_msg_buf function is used to ensure safe handling of
I2C messages in HCI DMA mode.

Signed-off-by: Billy Tsai <billy_tsai@...eedtech.com>
---
 drivers/i3c/master/mipi-i3c-hci/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index a408feac3e9e..3567cd566339 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -382,7 +382,7 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
 		return -ENOMEM;
 
 	for (i = 0; i < nxfers; i++) {
-		xfer[i].data = i2c_xfers[i].buf;
+		xfer[i].data = i2c_get_dma_safe_msg_buf(&i2c_xfers[i], 1);
 		xfer[i].data_len = i2c_xfers[i].len;
 		xfer[i].rnw = i2c_xfers[i].flags & I2C_M_RD;
 		hci->cmd->prep_i2c_xfer(hci, dev, &xfer[i]);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ