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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y0zk26ko.wl-kuninori.morimoto.gx@renesas.com>
Date: Thu, 9 Jan 2025 00:07:19 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>
Cc: Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] ASoC: simple-card-utils: fix priv->dai_props indexing


Hi Laurentiu

> >> +#define runtime_simple_priv_to_props(priv, rtd)
> >> +	((priv)->dai_props + ((rtd)->dai_link - (priv)->dai_link))
> > Oh yes, indeed.
> >
> > But I wonder it is needed not only utils, but all drivers
> > (= simple-card/audio-graph-card/audio-graph-card2).
> 
> At this point I'd say there's no need to do the replacement anywhere else. That's because the code
> still using simple_priv_to_props() makes use of the link number to index the array, which is fine.
> This is opposed to the PCM runtime data ID that may not correspond to a link number, thus making it
> unfit for use as an array index.

Oops, my previous mail indicates strange sample.

I would like to tell was update simple_priv_to_props() itself

-	#define simple_priv_to_props(priv, i)	((priv)->dai_props + (i))
+	#define simple_priv_to_props(priv, rtd)	\
+		((priv)->dai_props + ((rtd)->dai_link - (priv)->dai_link))

...

-	simple_priv_to_props(priv, rtd->id);
+	simple_priv_to_props(priv, rtd);


Thank you for your help !!

Best regards
---
Kuninori Morimoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ