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: <201006161207.14257.rusty@rustcorp.com.au>
Date:	Wed, 16 Jun 2010 12:07:13 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Yehuda Sadeh <yehuda@...newdream.net>
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	yehudasa@...il.com, sage@...dream.net
Subject: Re: [PATCH 1/1] module: initialize module dynamic debug later

On Wed, 16 Jun 2010 09:56:37 am Yehuda Sadeh wrote:
> We should initialize the module dynamic debug datastructures
> only after determining that the module is not loaded yet. This
> fixes a bug that introduced in 2.6.35-rc2, where when a trying
> to load a module twice, we also load it's dynamic printing data
> twice which causes all sorts of nasty issues. Also handle
> the dynamic debug cleanup later on failure.
> 
> Signed-off-by: Yehuda Sadeh <yehuda@...newdream.net>

Hi Yehuda,

  Thanks for tracking this down.  One minor comment:

>  #if defined(CONFIG_DYNAMIC_DEBUG)
> -extern int ddebug_remove_module(char *mod_name);
> +extern int ddebug_remove_module(const char *mod_name);
>  
>  #define __dynamic_dbg_enabled(dd)  ({	     \
>  	int __ret = 0;							     \
> @@ -73,7 +73,7 @@ extern int ddebug_remove_module(char *mod_name);
>  
>  #else
>  
> -static inline int ddebug_remove_module(char *mod)
> +static inline int ddebug_remove_module(const char *mod)
>  {
>  	return 0;
>  }

This implies we don't need the #ifdef here:

> +static void dynamic_debug_remove(struct _ddebug *debug)
> +{
> +#ifdef CONFIG_DYNAMIC_DEBUG
> +	if (debug)
> +		ddebug_remove_module(debug->modname);
> +#endif
> +}
> +

So I removed it.  It'd be nice to have a similar wrapper in the header
for ddebug_add_module so we can avoid the #ifdef there too, but that's
a separate patch.

Applied!
Rusty.
--
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