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: <2025020416561726c9efa0@mail.local>
Date: Tue, 4 Feb 2025 17:56:17 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Billy Tsai <billy_tsai@...eedtech.com>,
	"pgaj@...ence.com" <pgaj@...ence.com>,
	"miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
	"conor.culhane@...vaco.com" <conor.culhane@...vaco.com>,
	"aniketmaurya@...gle.com" <aniketmaurya@...gle.com>,
	"Shyam-sundar.S-k@....com" <Shyam-sundar.S-k@....com>,
	"jarkko.nikula@...ux.intel.com" <jarkko.nikula@...ux.intel.com>,
	"wsa+renesas@...g-engineering.com" <wsa+renesas@...g-engineering.com>,
	"xiaopei01@...inos.cn" <xiaopei01@...inos.cn>,
	"Guruvendra.Punugupati@....com" <Guruvendra.Punugupati@....com>,
	"linux-i3c@...ts.infradead.org" <linux-i3c@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	BMC-SW <BMC-SW@...eedtech.com>
Subject: Re: [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg
 pointer in i2c_xfers API

On 04/02/2025 17:50:14+0100, Thomas Weißschuh wrote:
> Hi Billy,
> 
> On 2025-02-04 10:09:31+0000, Billy Tsai wrote:
> > > On 2025-02-04 17:17:01+0800, Billy Tsai wrote:
> > > > The change is necessary to enable the use of the
> > > > `i2c_get_dma_safe_msg_buf()` API, which requires a non-const
> > > > `struct i2c_msg *` to operate. The `i2c_get_dma_safe_msg_buf()` function
> > > > ensures safe handling of I2C messages when using DMA, making it essential
> > > > for scenarios where DMA transfers are involved. By removing the `const`
> > > > qualifier, this patch allows drivers to prepare and manage DMA-safe
> > > > buffers directly.
> > 
> > > This is missing a changelog to v1 of the series.
> > 
> > > Also I asked before why it is not possible to change the signature of
> > > i2c_get_dma_safe_msg_buf() to accept 'const struct i2c_msg *' [0].
> > > That looks like the nicer solution to me.
> 
> > The i2c_get_dma_safe_msg_buf() function has existed for a long time,
> > but I do not know the original reason why it declares struct i2c_msg *
> > without const.
> 
> I would guess that nobody ever cared before.
> 
> > However, I believe this is because the
> > i2c_put_dma_safe_msg_buf() function modifies the buffer data, so for
> > consistency, it is declared without const.
> 
> IMO that's a weak argument.
> Maybe the maintainers have a preference?
> 

I guess Wolfram will be the one have the preference, I'm fine using the
existing API as-is.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ