Re: [lc-devel] [RFC] LZO de/compression support in kernel [0/5]
Status: Beta
Brought to you by:
nitin_sf
From: Nitin G. <nit...@gm...> - 2007-05-15 10:06:45
|
Hi, On 5/14/07, Richard Purdie <ri...@op...> wrote: > * The safe decompression version of the decompress function is missing. > Ideally we should have that as I suspect most kernel use cases should be > doing bounds checking. I did wonder if we should have bounds checking in > the compression case too although its less significant from a security > PoV. > I think the "safe" decompress version is only required when we suspect that compressed data might be corrupted. Otherwise, if such data corruption is not possible then this "unsafe" decompress will never overrun output buffer -- since output buffer lenght is not used by unsafe version but still it should never exceed buffer size beyoond original data size. I think I should contact the author to make sure I am correct here... Also "safe" decompress will obviously have perf penalties too. But anyhow adding option for have safe decompress is worth it. > * The code doesn't conform to CodingStyle as tabs aren't used for > indentation for a start and the brackets don't conform either. > > * For a better version of the include/linux/lzo1x.h header file see my > include/linux/lzo.h patch which includes error codes and maximum > compression size defines. > > * My patch series adds crypto layer support which might be useful for > testing > > * The patch series will need to be merged into one patch for submission > to mainline since its all interdependent. > > Just to confirm, this code is 100% compatible with data compressed with > LZO's lzo1x_compress function? > > I suspect there is some hybrid between the two versions which would be > ideal! :) > > Cheers, > > Richard > > |