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: <516b13b634374885891ac1e808d37ce3@AcuMS.aculab.com>
Date:   Tue, 13 Jun 2023 13:13:54 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Andy Shevchenko' <andriy.shevchenko@...ux.intel.com>,
        Mike Snitzer <snitzer@...nel.org>,
        Heinz Mauelshagen <heinzm@...hat.com>,
        "dm-devel@...hat.com" <dm-devel@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Alasdair Kergon <agk@...hat.com>
Subject: RE: [PATCH v1 1/1] dm integrity: Use %*ph for printing hexdump of a
 small buffer

From: Andy Shevchenko
> Sent: 12 June 2023 22:48
> 
> The kernel already has a helper to print a hexdump of a small
> buffer via pointer extension. Use that instead of open coded
> variant.
> 
> In long term it helps to kill pr_cont() or at least narrow down
> its use.
> 
> Note, the format is slightly changed, i.e. the colon is not printed
> before the buffer dump and the trailing space is always printed.
> These are not a problem since it's a debug message. Also the IV dump
> is limited by 64 bytes which seems fine.
...
> +#define DEBUG_bytes(bytes, len, msg, ...)	printk(KERN_DEBUG msg " %*ph\n", ##__VA_ARGS__, len,
> bytes)

Using:
	printf(KERN_DEBUG msg "%s%*ph\n", ##__VA_ARGS__, len ? ": " : "", len, bytes)
would add back the optional ':'.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ