In perl.git, the branch yves/hv_h_split has been created
<http://perl5.git.perl.org/perl.git/commitdiff/9d91bed998fd2364dc35e99693697b16cf02d6f7?hp=0000000000000000000000000000000000000000>
at 9d91bed998fd2364dc35e99693697b16cf02d6f7 (commit)
- Log -----------------------------------------------------------------
commit 9d91bed998fd2364dc35e99693697b16cf02d6f7
Author: Yves Orton <[email protected]>
Date: Tue Feb 19 13:25:53 2013 +0100
semi-Randomize hash insertion order
M hv.c
commit a4d884b60c396953196b7ad61a1485157d62cb50
Author: Yves Orton <[email protected]>
Date: Mon Feb 18 10:18:48 2013 +0100
randomize bucket split insertion in hsplit()
We use the HvRAND data as a set of flags that we rotate
over as we move items into the high buckets. If the flag is
set we insert one after the top, if the flag is not set we
insert into the top like we used to. This means the order
will be perturbed somewhat.
M hv.c
commit 8cd88cc7ccf4ed3a56c94c38e829a741a7125b2b
Author: Yves Orton <[email protected]>
Date: Mon Feb 18 08:11:18 2013 +0100
Enable hash traversal order randomization
This patch causes Perl to use a random order per hash when traversing hashes
via keys(), values() and each().
The random order is determined by add a new property xhv_rand to struct
xpvhv. This property is calculated on per traverse of the hash by using a
pointer/integer hash function on the address of the bucket array, and then
XORing it with the bucket index counter during traverse. This causes each
hash to have a different order for traversing the buckets.
The purpose of this change is to make hash seed discovery attacks harder.
An attacker loses a lot of information when the keys are "randomized".
The ptr_hash() sub is borrowed, with changes, from autobox, which is
released
under the same terms as Perl.
M embed.fnc
M embed.h
M hv.c
M hv.h
M proto.h
M t/op/smartkve.t
commit 8b7309296073889bc2d84c41f72f88d25f901669
Author: Yves Orton <[email protected]>
Date: Tue Feb 12 05:06:48 2013 +0100
default to PERL_FUNC_ONE_AT_A_TIME_HARD for all builds
For testing, but maybe for ever
M hv_func.h
commit 2b6872e5e00e9b849eccc8388f791a5323a65260
Author: Yves Orton <[email protected]>
Date: Tue Dec 11 08:50:58 2012 +0100
silence signed mistmatch in comparison warning in Murmurhash
as far as I can tell 'i' can only be positive here.
M hv_func.h
commit d1ef68410619bfa70224c9f12b55c6d1ed0b929a
Author: Yves Orton <[email protected]>
Date: Mon Dec 10 08:36:43 2012 +0100
add a hardened one-at-a-time hash variant
Mix in additional randomness into the final value.
M hv_func.h
commit 48e2c7d9e59ed350d9beb75daa6d3efa867e7401
Author: Yves Orton <[email protected]>
Date: Sat Dec 8 16:24:06 2012 +0100
Split out hash functions into new file and turn into inline static functions
This includes various tweaks related to building SipHash and other
cleanup.
M Cross/Makefile-cross-SH
M MANIFEST
M Makefile.SH
M Makefile.micro
M NetWare/Makefile
M configpm
M hv.h
A hv_func.h
M win32/Makefile
M win32/Makefile.ce
commit 199b5bd920544d3844d168bf7f02bdfee1d3c91c
Author: Yves Orton <[email protected]>
Date: Tue Dec 11 23:46:37 2012 +0100
add a "hash quality score" to Hash::Util::bucket_stats()
M ext/Hash-Util/lib/Hash/Util.pm
commit 4b4c1b1c07f0f8935b3f44f0a2114993eebbbecb
Author: Yves Orton <[email protected]>
Date: Mon Dec 10 09:43:59 2012 +0100
Various changes to cpan/ExtUtils-MakeMaker
Fix code which modifies a hash while each()ing over it
It has never been correct to modify a hash during traversal by each().
In older perls this was unlikely to break the tests. In newer perls
it is relatively likely, and in 5.18 it will be almost certain.
Do not hard code the list of perl header files - discover them from disk
instead
Don't need completely different include file collector on VMS.
We just need to skipping putting a Unix delimiter between the
directory and the filename.
Includes a version bump to all the EU::MM files (to prevent any possible
$VERSION consistency checks from failing like they would on *nix)
This patch has been submitted to the EU::MM project in a modified form
and once merged there should replace these changes.
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
M cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
M cpan/ExtUtils-MakeMaker/t/basic.t
commit ff2a5c623668ae061bea07b4e2143f42b4935451
Author: Yves Orton <[email protected]>
Date: Mon Feb 18 07:56:25 2013 +0100
cpan/Pod-Simple: Fix test fails due to hash traversal randomization
One cannot assume two hashes with the same keys will have the
the same key order. And after hash traversal randomization one
can assume they WONT.
Waiting on upstream changes
M cpan/Pod-Simple/t/closeys.t
commit dab308a3af51ef805d66d162c753a198bbef174f
Author: Yves Orton <[email protected]>
Date: Mon Feb 18 06:37:29 2013 +0100
cpan/JSON-PP: Fix tests that fail due to hash traversal randomization
One cannot assume two hashes with the same keys will have the
the same key order. And after hash traversal randomization one
can assume they WONT.
Waiting on new release of upstream
M cpan/JSON-PP/t/019_incr.t
commit 9fa5176b44225cddd8b1a184f85fdf6207d85f98
Author: Yves Orton <[email protected]>
Date: Tue Feb 19 12:14:44 2013 +0100
Ensure that Module::Pluggable returns plugins in a predictable order
As of 5.18 hash traversal order will vary per-hash, and indeed more
frequently. The likelihood this results in one of the tests in M::P
failing becomes very high.
In general the test expectations were fragile, but probably almost
never failed. With hash traversal randomization they will fail
regularly.
Note the use a temporary array in part of this patch is because
sort in scalar context is undefined.
M cpan/Module-Pluggable/lib/Module/Pluggable.pm
M cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm
M cpan/Module-Pluggable/t/19can_ok_clobber.t
commit a731b1fce6ad900cdba1b3905842bb983b6dff28
Author: Aaron Crane <[email protected]>
Date: Tue Feb 19 14:17:59 2013 +0000
perlfunc: clarify that "do $file" isn't really like "eval `cat $file`"
Closes RT#116713.
M pod/perlfunc.pod
-----------------------------------------------------------------------
--
Perl5 Master Repository