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: <027d01cc5911$8d388770$a7a99650$@systemfabricworks.com>
Date:	Fri, 12 Aug 2011 12:01:59 -0500
From:	"Bob Pearson" <rpearson@...temfabricworks.com>
To:	"'Joakim Tjernlund'" <joakim.tjernlund@...nsmode.se>
Cc:	<akpm@...ux-foundation.org>, <fzago@...temfabricworks.com>,
	<linux@...izon.com>, <linux-kernel@...r.kernel.org>
Subject: RE: [patch v5 resending 0/8] Add slicing-by-8 to crc32

> 
> > The changes to gen_crc32table.c looks random, where did this come from
> > (in v5 6/8):
> >  -static uint32_t crc32table_le[4][LE_TABLE_SIZE];
> > -static uint32_t crc32table_be[4][BE_TABLE_SIZE];
> > +static uint32_t crc32table_le[4][256];
> > +static uint32_t crc32table_be[4][256];
> 
> The table was declared as shown but is passed from main to output_table as
> "uint32_t table[4][256]"
> 
> This causes a compiler warning because the types don't match. As it
happens
> the program prints out correct results because rows other than 0 are only
> used of the column size is 256. I interpreted LE_TABLE_SIZE as the desired
> size of the output table (which it is) and let the working table in
> gen_crc32table.c be dimensioned at 256. I suppose that one could have
> changed the dimension in output_table as well.
> 

One more point I forgot when I wrote this. Output_table is used for both LE
and BE tables which could have different values for ?E_TABLE_SIZE. There is
no sensible choice for changing the declaration in output_table to try to
match the various table sizes. It is much simpler to just make the tables
"by 256" and leave it at that. Since this is a build time resource there is
no penalty for the kernel itself.

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