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]
Date:	Fri, 22 Apr 2016 10:33:02 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Du, Changbin" <changbin.du@...el.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jonathan Corbet <corbet@....net>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	josh@...htriplett.org, Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	jiangshanlai@...il.com, John Stultz <john.stultz@...aro.org>,
	Tejun Heo <tj@...nel.org>, borntraeger@...ibm.com,
	dchinner@...hat.com, linux-doc@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/7] debugobjects: make fixup functions return bool
 instead of int

On Fri, 22 Apr 2016, changbin.du@...el.com wrote:
> From: "Du, Changbin" <changbin.du@...el.com>
> 
> The object debugging infrastructure core provides some fixup callbacks
> for the subsystem who use it. These callbacks are called from the debug
> code whenever a problem in debug_object_init is detected. And
> debugobjects core suppose them returns 1 when the fixup was successful,
> otherwise 0. So the return type is boolean.
> 
> A bad thing is that debug_object_fixup use the return value for
> arithmetic operation. It confused me that what is the reall return

What's bad about that? The fact that it's used for arithmethic operation or
that it confused you?

> Reading over the whole code, I found some place do use the return value
> incorrectly(see next patch). So why use bool type instead?

Patches which fix a problem need to come first not in the middle of a revamp
series.
 
> +	bool (*fixup_init)(void *addr, enum debug_obj_state state);
> +	bool (*fixup_activate)(void *addr, enum debug_obj_state state);
> +	bool (*fixup_destroy)(void *addr, enum debug_obj_state state);
> +	bool (*fixup_free)(void *addr, enum debug_obj_state state);
> +	bool (*fixup_assert_init)(void *addr, enum debug_obj_state state);

So this change will introduce a gazillion of compile warnings because the
callbacks in the various usage sites are still having 'int' return type.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ