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: <Z9r0VK0UWF1-mco9@smile.fi.intel.com>
Date: Wed, 19 Mar 2025 18:44:04 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Petr Mladek <pmladek@...e.com>,
	David Laight <david.laight.linux@...il.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>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] hexdump: Print the prefix after the last line to
 show the dump is over

On Wed, Mar 19, 2025 at 05:08:12PM +0100, Miquel Raynal wrote:
> When skipping duplicated lines, the end of the log can just be a
> star ("*") which may be confusing (?), so in order to clarify the end of
> the log, tell the user how many lines where skipped and mimic the
> userspace hexdump output, let's add in this case a new line with the
> next offset.
> 
> With the following data:
> 
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 
> When skipping identical lines we were seeing:
> 
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> *
> 
> And now we will have:
> 
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> *
> 00000080
> 
> However if the output was (first bit of first byte on last line changed):
> 
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 00000070: fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
>            ^
> 
> When skipping identical lines we would see:
> 
> 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> *
> 00000070: fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
> 
> And in this case the output would not change with this patch.

Thanks!

LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

...

> This change is not related to the two first patches and is just an
> addition that was requested by Andy who felt like it was not clear where
> the dump was ending with the 'SKIP_DUPLICATE' flag when the last line
> was skipped. Honestly this never bothered me, so depending on the
> maintainers wishes, this can either be applied or skipped.

I was also referring to userpsace `hexdump` behaviour. And I find it logical.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ