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] [day] [month] [year] [list]
Message-ID: <87tsw9tcmo.wl-kuninori.morimoto.gx@renesas.com>
Date: Mon, 26 Jan 2026 00:56:48 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Fabio <fabio@...aril.me>
Cc: Fabio Forni <development@...aril.me>, Mark Brown <broonie@...nel.org>,
 Liam Girdwood <lgirdwood@...il.com>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>, linux-sound@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [RFC 3/3] ASoC: simple-card: Split alloc and init logics in probe function


Hi Fabio

> > 	func () {
> > 		...
> > (A)		if (...)
> > 			error("indicate error reason1")
> > (A)		if (...)
> > 			error("indicate error reason2")
> > 		...
> > 	}
> > 
> > 
> > 	main() {
> > 		...
> > 		ret = func();
> > (B)		if (ret < 0)
> > 			error("func() error")
> > 		...
> > 	}
> 
> Hm, I think you're being too abstract for my comprehension, sorry about that.
> Let me assume main() is the probe function, and func() is whatever function
> that probe() calls. If my assumptions are correct, then:

Sorry for my not good explanation, indeed it is too abstract.
Above (A) and (B) exists in the same time, I meant.

> - In (A), are we letting child functions print the reason of their own error?

Yes. indicate why it become error in each function.
Because size is too small, memory alloc failed, etc, etc...

> - In (B), I think it's the approach already being used for
> simple_parse_of(), isn't it?

(B) indicates func() returns error. I think this can indicate error path,
like below

	xxx size failed (error reason)		// (A)
	funcB() error				// (B)
	funcA() error				// (B)

Developer can understand that funcA() calls funcB() and funcB() returns
error from this message.
But this is not mandatory, just an idea.

I think simple_ret() can help you, but I'm not sure whether you can use it
on probe function.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ