summaryrefslogtreecommitdiffstats
path: root/lib/lzo
Commit message (Collapse)AuthorAgeFilesLines
* lib: lzo: drop unused compression codeAhmad Fatoum2020-09-143-286/+0
| | | | | | | | The code doesn't compile and went unused since being added 10 years ago. Remove it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix 'new blank line at EOF' formatting errorAntony Pavlov2015-07-021-1/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lzo: check for length overrun in variable length encoding.Stefan Müller-Klieser2015-03-251-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corresponds to kernel commit 72cf90124e87d975d0b This fix ensures that we never meet an integer overflow while adding 255 while parsing a variable length encoding. It works differently from commit 206a81c ("lzo: properly check for overruns") because instead of ensuring that we don't overrun the input, which is tricky to guarantee due to many assumptions in the code, it simply checks that the cumulated number of 255 read cannot overflow by bounding this number. The MAX_255_COUNT is the maximum number of times we can add 255 to a base count without overflowing an integer. The multiply will overflow when multiplying 255 by more than MAXINT/255. The sum will overflow earlier depending on the base count. Since the base count is taken from a u8 and a few bits, it is safe to assume that it will always be lower than or equal to 2*255, thus we can always prevent any overflow by accepting two less 255 steps. This patch also reduces the CPU overhead and actually increases performance by 1.1% compared to the initial code, while the previous fix costs 3.1% (measured on x86_64). The fix needs to be backported to all currently supported stable kernels. Reported-by: Willem Pinckaers <willem@lekkertech.net> Cc: "Don A. Bailey" <donb@securitymouse.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "lzo: properly check for overruns"Stefan Müller-Klieser2015-03-251-42/+22
| | | | | | | | | | | | | | | | | This reverts barebox commit ecb1dc0b1e859bca9 This corresponds to kernel commit af958a38a60c7ca3d8 As analysed by Willem Pinckaers, this fix is still incomplete on certain rare corner cases, and it is easier to restart from the original code. Reported-by: Willem Pinckaers <willem@lekkertech.net> Cc: "Don A. Bailey" <donb@securitymouse.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lzo: properly check for overrunsHolger Schurig2014-07-021-22/+42
| | | | | | | | | | | | | | Note: this is the same as 206a81c18401c0cde6e579164f752c4b147324ce in linux-git. The lzo decompressor can, if given some really crazy data, possibly overrun some variable types. Modify the checking logic to properly detect overruns before they happen. Reported-by: "Don A. Bailey" <donb@securitymouse.com> Tested-by: "Don A. Bailey" <donb@securitymouse.com> Signed-off-by: Holger Schurig <holgerschurig@gmail.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lzo: update to lzo-2013Jean-Christophe PLAGNIOL-VILLARD2013-09-225-400/+452
| | | | | | | | | | | | | | | | | | take from linux next-20130227 same version as v3.11 before -rwxr-xr-x 1 root root 123001 Feb 28 01:04 build/highbank/arch/arm/pbl/zbarebox.bin after -rwxr-xr-x 1 root root 122226 Feb 28 01:02 build/highbank/arch/arm/pbl/zbarebox.bin smaller and faster Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lzo: Allow for static inliningSascha Hauer2012-07-231-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Unused files removedAlexander Shiyan2012-06-301-2/+0
| | | | | | | | Files "modules.builtin" probably have been copied from kernel tree. This files not used by barebox and can be removed safely. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* uncompress: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-111-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* lib: prompt for uncompression functionsSascha Hauer2011-11-291-0/+1
| | | | | | | | Allow the user to manually select the uncompression support he wants to have so that we have a single point where a user can see which uncompression support will be compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add unlzo supportSascha Hauer2010-03-306-0/+528
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>