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: <87si3b8jha.fsf@rasmusvillemoes.dk>
Date:	Wed, 09 Dec 2015 21:17:37 +0100
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	Joe Perches <joe@...ches.com>, Rob Herring <robh+dt@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	"devicetree\@vger.kernel.org" <devicetree@...r.kernel.org>,
	Frank Rowand <frowand.list@...il.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>
Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()

On Wed, Dec 09 2015, Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Wed, Dec 9, 2015 at 9:28 PM, Joe Perches <joe@...ches.com> wrote:
>> ---
>>  include/linux/printk.h |  7 +++++++
>>  lib/hexdump.c          | 39 +++++++++++++++++++++++++++++++--------
>>  2 files changed, 38 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/linux/printk.h b/include/linux/printk.h
>> index 9729565..4be190c 100644
>> --- a/include/linux/printk.h
>> +++ b/include/linux/printk.h
>> @@ -424,6 +424,13 @@ enum {
>>         DUMP_PREFIX_ADDRESS,
>>         DUMP_PREFIX_OFFSET
>>  };
>> +
>> +enum {
>> +       DUMP_TYPE_CPU = 0,
>
> And still open this, do we need it? I think you may just mention in
> the documentation that default behaviour is CPU like.

I think it's best to have a name for the default. In this case it's
unlikely to ever be relevant, but in general one could imagine stuff
like

#ifdef THIS_OR_THAT
#define MY_DUMP_TYPE DUMP_TYPE_LE
#else
#define MY_DUMP_TYPE DUMP_TYPE_CPU
#endif

which is a lot more readable than if the latter was a naked 0.

The feature seems fine to me. It's always been somewhat annoying that
grouping changes the order of the byte values on little-endian machines
(so grouping is actually a wrong name for it; it's more like "treat the
bytes an array of u16/u32/u64"), and one can now get around that by
specifying DUMP_TYPE_BE.

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