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]
Message-ID: <20250110193930.26b08c2f@pumpkin>
Date: Fri, 10 Jan 2025 19:39:30 +0000
From: David Laight <david.laight.linux@...il.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
 Rasmus Villemoes <linux@...musvillemoes.dk>, Sergey Senozhatsky
 <senozhatsky@...omium.org>, Jonathan Corbet <corbet@....net>, John Ogness
 <john.ogness@...utronix.de>, Andrew Morton <akpm@...ux-foundation.org>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Thomas Petazzoni
 <thomas.petazzoni@...tlin.com>, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] hexdump: Allow skipping identical lines

On Fri, 10 Jan 2025 19:42:05 +0100
Miquel Raynal <miquel.raynal@...tlin.com> wrote:

> When dumping long buffers (especially for debug purposes) it may be very
> convenient to sometimes avoid spitting all the lines of the buffer if
> the lines are identical. Typically on embedded devices, the console
> would be wired to a UART running at 115200 bauds, which makes the dumps
> very (very) slow. In this case, having a flag to avoid printing
> duplicated lines is handy.
... 
>  enum {
>  	DUMP_FLAG_ASCII,
> +	DUMP_FLAG_SKIP_IDENTICAL_LINES,
>  };
...
> +		if (flags & DUMP_FLAG_SKIP_IDENTICAL_LINES) {


That doesn't look right to me.
You want:
enum {
	DUMP_FLAG_HEX_ONLY = false,
	DUMP_FLAG_ASCII = true,
	DUMP_FLAG_SKIP_IDENTICAL_LINES = BIT(1),
};

and maybe you can get away with not changing all the other files.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ