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:	Sat, 7 May 2016 10:26:28 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Du, Changbin" <changbin.du@...el.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"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>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugobjects: insulate non-fixup logic related to static
 obj from fixup callbacks

On Sat, 7 May 2016, changbin.du@...el.com wrote:

Can you please fix your mail client. Every mail you send has:

Cc: .....
    "Du, Changbin" <changbin.du@...el.com>,
    Du

And that stray 'Du' is just broken.

> At last, I have a concern about the fixups that can it change the
> object which is in incorrect state on fixup? Because the 'addr' may
> not point to any valid object if a non-static object is not tracked.
> Then Change such object can overwrite someone's memory and cause
> unexpected behaviour. For example, the timer_fixup_activate bind
> timer to function stub_timer.

Well, you have the choice of:

 1) Leave the object uninitialized and watch the resulting explosion

 2) Assume that the pointer is a valid object and initialize it     

The latter has been chosen as the lesser of two evils.

>  		raw_spin_unlock_irqrestore(&db->lock, flags);
>  		/*
> -		 * Maybe the object is static.  Let the type specific
> +		 * Maybe the object is static. Let the type specific
>  		 * code decide what to do.

Instead of doing white space changes you really want to explain the logic
here.

>  		 */
> -		if (debug_object_fixup(descr->fixup_assert_init, addr,
> -				       ODEBUG_STATE_NOTAVAILABLE))
> +		if (descr->is_static_object && descr->is_static_object(addr)) {
> +			/* Make sure that it is tracked in the object tracker */
> +			debug_object_init(addr, descr);
> +		} else {
>  			debug_print_object(&o, "assert_init");
> +			debug_object_fixup(descr->fixup_assert_init, addr,
> +					   ODEBUG_STATE_NOTAVAILABLE);
> +		}
>  		return;
>  	}

Other than the missing comment this looks good.

Thanks,

	tglx

Powered by blists - more mailing lists