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>] [day] [month] [year] [list]
Date:	Wed, 21 Sep 2011 10:28:02 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	akpm@...gle.com
cc:	cschan@...eaurora.org, john.stultz@...aro.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch 1/2] debugobjects: extend debugobjects to assert that an
 object is initialized

On Tue, 20 Sep 2011, akpm@...gle.com wrote:

Back to LKML

> From: Christine Chan <cschan@...eaurora.org>
> Subject: debugobjects: extend debugobjects to assert that an object is initialized
> 
> Add new check (assert_init) to make sure objects are initialized and
> tracked by debugobjects.

When is this function to be called and what problem does it solve
which is not handled by the current code?
 
> +	int (*fixup_assert_init)(void *addr, enum debug_obj_state state);
>  };
>  
>  /**
> + * debug_object_assert_init - debug checks when object should be init-ed
> + * @addr:	address of the object
> + * @descr:	pointer to an object specific debug description structure
> + */
> +void debug_object_assert_init(void *addr, struct debug_obj_descr *descr)
> +{
> +	struct debug_bucket *db;
> +	struct debug_obj *obj;
> +	unsigned long flags;
> +
> +	if (!debug_objects_enabled)
> +		return;
> +
> +	db = get_bucket((unsigned long) addr);
> +
> +	raw_spin_lock_irqsave(&db->lock, flags);
> +
> +	obj = lookup_object(addr, db);
> +	if (!obj) {
> +		raw_spin_unlock_irqrestore(&db->lock, flags);
> +		/*
> +		 * Maybe the object is static.  Let the type specific
> +		 * code decide what to do.
> +		 */
> +		debug_object_fixup(descr->fixup_assert_init, addr,
> +				   ODEBUG_STATE_NOTAVAILABLE);

So what's the point of requiring that function to return a value when
it's unchecked?

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ