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: <D753FB79-8E82-4F36-881A-68858145B688@holtmann.org>
Date:	Sun, 20 Oct 2013 00:30:07 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Joe Perches <joe@...ches.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vsprintf: add Bluetooth UUID %pU[rR] format specifier

Hi Joe,

>> The Bluetooth UUID is used in big endian reversed order. Add new
>> modifier to print a UUID in big endian, but where the input byte
>> stream is actually in reversed order.
>> This is similar to %pMR that allows to print a MAC address in
>> reversed order since that is how the Bluetooth BD_ADDR is
>> actually represented in a byte stream.
> 
> Seems sensible.  Other than print_bt_uuid, is
> there another place where will it be used?
> 
> Are you going to convert print_bt_uuid to use this?

my plan is to convert this one when this modifier gets upstream.

>> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> []
>> @@ -1106,6 +1106,7 @@ char *uuid_string(char *buf, char *end, const u8 *addr,
>> 	static const u8 le[16] = {3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15};
>> 	const u8 *index = be;
>> 	bool uc = false;
>> +	bool reversed = false;
>> 
>> 	switch (*(++fmt)) {
> 
> Could there ever be a little endian reversed UUID?

I honestly do not know. I looked at the little endian one and it looked a bit heavy misplaced if we would use a reversed stream of bytes.

> Might it be useful to change this to:
> 
> 	while (isalpha(*++fmt)) {
> 		switch (*fmt) {

I didn't do it so the modifier didn't get any longer than it needs to be.

Regards

Marcel

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