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]
Date:	Wed, 14 May 2014 18:26:09 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	George Spelvin <linux@...izon.com>, pavel@....cz
CC:	arik@...ery.com, david.gnedt@...izone.at, eliad@...ery.com,
	jan.nikitenko@...il.com, laurent.pinchart+renesas@...asonboard.com,
	linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
	linux-spi@...r.kernel.org, linux-wireless@...r.kernel.org,
	linville@...driver.com, luca@...lho.fi, tony@...mide.com
Subject: Re: [PATCH v2 1/3] lib/crc7: Shift crc7() output left 1 bit

Seems to me to make the code easier to read, not harder. That was the whole point.

On May 14, 2014 6:15:51 PM PDT, George Spelvin <linux@...izon.com> wrote:
>H. Peter Anvin wrote:
>> If the whole point of this is to use it for MMC/SD cards, why not
>just
>> also subsume the OR 1 and call it crc7_mmc() or something like that.
>>
>> (Which I'm all for doing... I don't know of any other crc7 users.)
>
>You'll find all users in my patch series.  2/3 updates the MMC
>card, while 3/3 hits drivers/net/wireless/ti/wl1251/spi.c and
>drivers/net/wireless/ti/wlcore/spi.c (which I'm pretty sure aren't
>MMC/SPI cards).
>
>Now, it turns out that they *also* set the lsbit (calling it
>WSPI_INIT_CMD_END).  However, it's not possible to put that into the
>CRC
>table (it would mess up all bytes but the last), so an explicitly coded
>"| 1" is required at the end.  Thic ends up being no saving at all to
>execution path length, and only moves one instruction from three
>drivers
>to shared code.  While making it harder to read the drivers.
>
>A microscopic space saving (if and only if you have more than one of
>these
>drivers loaded) and no performance improvement didn't seem worth it to
>me.

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.
--
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