Skip to content
Commit 386d6415 authored by Christophe Leroy's avatar Christophe Leroy Committed by Tom Rini
Browse files

zlib: Fix big performance regression



Commit 340fdf13 ("zlib: Port fix for CVE-2016-9841 to U-Boot")
brings a big performance regression in inflate_fast(), which leads
to watchdog timer reset on powerpc 8xx.

It looks like that commit does more than what it describe, it
especially removed an important optimisation that was doing copies
using halfwords instead of bytes. That unexpected change multiplied
by almost 4 the time spent in inflate_fast() and increased by 40%
the overall time needed to uncompress linux kernel image.

So partially revert that commit but keep post incrementation as it
is the initial purpose of said commit.

Fixes: 340fdf13 ("zlib: Port fix for CVE-2016-9841 to U-Boot")
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
parent efee71ab
Loading
Loading
Loading
Loading