Re: Algoritmic Complexity Attacks and 2.4.20 the dcache code

David S. Miller
2003-05-31T06:06:17Z

From: Scott A Crosby <scrosby@cs.rice.edu>
Date: 30 May 2003 10:05:51 -0500

On Fri, 30 May 2003 02:00:40 -0700 (PDT), "David S. Miller" <davem@redhat.com> writes:

> Indeed, I'd missed this. GCC will emit the constant multiply
> expansion unless the multiply cost is set VERY low.

It may still be a win. This does a bit under a dozen instructions per
byte. However, jenkin's does many bytes at a time.

It turns out to not be the case at all. There is too much work
involved in the main loop just maintaining the 3-word + curbyte
state.

It needs to be optimized a bit.