In demerphq's own words:
bulk88> I disagree there is a measurable cost to the current implementation of
bulk88> REHASH. If the rehash code is so rare, maybe it should be removed from
bulk88> hv_common and placed in its own func, but looking at the asm, the
bulk88> overhead is so tiny I dont think the rehash code even matters compared
bulk88> to the rest of the design of hv_common. I don't see any performance
bulk88> gains by removing it.
demerphq Yes, I am unable to show any actual performance gains either.
So, not for performance (gain) reasoning.
Also in his own words:
demerphq So I think that the current rehash mechanism is about as secure as the
random hash seed proposal.
demerphqPersonally I dont think its worth the effort of doing much more than
thinking about this until someone demonstrates at least a laboratory
grade attack. IMO in a real world environment with multi-host web
sites, web servers being restarted, load balancers, and etc, that
simple hash randomization is sufficient. Seems like any attack would
require large numbers of fetch/response cycles and in general would
just not be effective in a real production environment. I would assume
that the administrators would notice the weird request pattern before
an attacker could discover enough information to cause damage. Same
argument for non-web services IMO.
And it doesn't make anything more secure.
And Dave_the_m said:
Indeed, based on the thread starting at
it looks like the primary motivation for moving to rehash was to restore
the binary compatibility within the 5.8.x branch inadvertently broken by
I'm not particularly keen on having hashes always randomised - it makes
debugging harder, and reproducing a reported issue nigh-on impossible;
but if Yves can show a measurable performance gain without the rehash
checks, then I'll approve, as long as the hash seed can still be
initialised with the env var PERL_HASH_SEED=0 - otherwise debugging
Which mirrors the OPs objections.
So, significant consequences
So, why? What did Perl gain?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||