lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 Jan 2017 15:27:44 -0700
From:   Jonathan Corbet <corbet@....net>
To:     Sven Schmidt <4sschmid@...ormatik.uni-hamburg.de>
Cc:     akpm@...ux-foundation.org, bongkyu.kim@....com,
        rsalvaterra@...il.com, sergey.senozhatsky@...il.com,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        herbert@...dor.apana.org.au, davem@...emloft.net,
        linux-crypto@...r.kernel.org, anton@...msg.org, ccross@...roid.com,
        keescook@...omium.org, tony.luck@...el.com
Subject: Re: [PATCH v6 1/5] lib: Update LZ4 compressor module

On Fri, 27 Jan 2017 23:02:00 +0100
Sven Schmidt <4sschmid@...ormatik.uni-hamburg.de> wrote:

I have one quick question...

>  /*
> + * LZ4_compress_default()
> + *	Compresses 'sourceSize' bytes from buffer 'source'
> + *	into already allocated 'dest' buffer of size 'maxOutputSize'.
> + *	Compression is guaranteed to succeed if
> + *	'maxOutputSize' >= LZ4_compressBound(inputSize).
> + *	It also runs faster, so it's a recommended setting.
> + *	If the function cannot compress 'source'
> + *	into a more limited 'dest' budget,
> + *	compression stops *immediately*,
> + *	and the function result is zero.
> + *	As a consequence, 'dest' content is not valid.
> + *
> + *	source       : source address of the original data
> + *	dest         : output buffer address
> + *                 of the compressed data
> + *	inputSize    : Max supported value is
> + *                 LZ4_MAX_INPUT_SIZE
> + *	maxOutputSize: full or partial size of buffer 'dest'
> + *                 (which must be already allocated)
> + *	workmem      : address of the working memory.
> + *                 This requires 'workmem' of size LZ4_MEM_COMPRESS.
> + *	return       : the number of bytes written into buffer 'dest'
> + *   (necessarily <= maxOutputSize) or 0 if compression fails
> + */
> +int LZ4_compress_default(const char *source, char *dest, int inputSize,
> +	int maxOutputSize, void *wrkmem);

Is there any chance you could format these as kerneldoc comments?  You're
not too far from it now, and that would allow the LZ4 interface to be
pulled into the documentation.

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ