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:	25 May 2011 01:46:34 -0400
From:	"George Spelvin" <linux@...izon.com>
To:	arend@...adcom.com, linux@...izon.com
Cc:	akpm@...ux-foundation.org, error27@...il.com,
	linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
	linville@...driver.com
Subject: Re: [RFC] lib: crc8: add new library module providing crc8 algorithm

> On 05/25/2011 12:52 AM, George Spelvin wrote:
>> May I suggest that crc8_create is A Stupid Idea.  Since the bit order
>> (and polynomial) will always be compile-time constants, just let the
>> call sites call crc8_create_[lm]sb_first() directly.

> Thanks for be subtle in your suggestion.

Since you are obviously being ironic in your phrasing, I hope I did not
give serious offense.  What I wrote is a fairly accurate description of
my reflex reaction, but I could have phrased it more diplomatically.

> If callers use the specific function they can not specify a bit order so 
> no compile-time error.

What I meant was, the bit order is specified by the function name.
An invalid bit order translates to an invalid function name, which the
linker will complain about.


If you feel ambitious, you can fold the crc7 code into yours.  Its an
msbit-first CRC.  The resultant table will be left-justified rather
than the current right-justified, but if you look at all the call sites,
you'll notice that they all shift the result left 1 bit!

I have a pending bug report about some of the calling code which I
noticed when trying to update it myself, but it doesn't actally
prevent updating the crc7() call sites:
http://marc.info/?l=linux-wireless&m=130616050311698
--
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