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, 03 Dec 2010 12:37:00 -0800
From:	Joe Perches <joe@...ches.com>
To:	Roman Fietze <roman.fietze@...emotive.de>
Cc:	Jason Baron <jbaron@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Proposal to add dynamic debug feature for
 print_hex_dump [2/2]

On Fri, 2010-12-03 at 15:21 +0100, Roman Fietze wrote:
> Subject: [PATCH 2/2] dynamic printk: add support for pr_debug_hex_dump
> Use dynamic printk wrapper to support turning pr_debug_hex_dump on and
> off similar to pr_debug using the dynamic debug sysfs control file.
> 
> Signed-off-by: Roman Fietze <roman.fietze@...emotive.de>
[]
> diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
> index a90b389..0610e74 100644
> @@ -74,6 +74,24 @@ do_printk:								\
>  out:	;								\
>  	} while (0)
>  
> +#define dynamic_pr_hex_dump(prfx_str, prfx_type, rowsz, grpsz,		\
> +			    buf, len, ascii)				\

I think this should be dynamic_pr_debug_hex_dump and
I think the arguments should be:

#define dynamic_pr_debug_hex_dump(prefix_str, prefix_type,		\
				  rowsize, groupsize, buf, len, ascii)	\

to mirror the print_hex_dump args.

> +#define dynamic_pr_hex_dump(prfx_str, prfx_type, rowsz,  grpsz,		\
> +			    buf, len, ascii)				\
> +	do { if (0) print_hex_dump(KERN_DEBUG, prfx_str, prfx_type, rowsz, grpsz, \
> +				   buf, len, ascii); } while (0)
>  #endif

here too.

But because this doesn't fit sensibly on a single line,
perhaps this should now be:

#define dynamic_pr_debug_hex_dump(prefix_str, prefix_type,		\
				  rowsize, groupsize, buf, len, ascii)	\
{									\
	if (0)								\
		print_hex_dump(KERN_DEBUG, prefix_str, prefix_type,	\
			       rowsize, groupsize, buf, len, ascii);	\
}
 
> @@ -230,13 +226,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
>  #if defined(DEBUG)
>  #define pr_debug(fmt, ...) \
>  	printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> +#define pr_debug_hex_dump(prfx_str, prfx_type, rowsz,  grpsz,		\
> +			  buf, len, ascii)				\
> +	print_hex_dump(KERN_DEBUG, prfx_str, prfx_type, rowsz, grpsz,	\
> +		       buf, len, ascii)

Please use the same argument names as print_hex_dump


--
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