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] [day] [month] [year] [list]
Message-ID: <E0798788-E0E4-4DC0-A64E-B137D618255E@fb.com>
Date:   Tue, 11 May 2021 19:33:26 +0000
From:   Nick Terrell <terrelln@...com>
To:     Rajat Asthana <thisisrast7@...il.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Gao Xiang <hsiangkao@...hat.com>,
        "joe@...ches.com" <joe@...ches.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] lz4_decompress: declare LZ4_decompress_safe_withPrefix64k
 static



> On May 11, 2021, at 8:43 AM, Rajat Asthana <thisisrast7@...il.com> wrote:
> 
> Declare LZ4_decompress_safe_withPrefix64k as static to fix sparse
> warning:
> 
>> warning: symbol 'LZ4_decompress_safe_withPrefix64k' was not declared.
>> Should it be static?
> 
> Signed-off-by: Rajat Asthana <thisisrast7@...il.com>
> ---
> lib/lz4/lz4_decompress.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
> index 8a7724a6ce2f..926f4823d5ea 100644
> --- a/lib/lz4/lz4_decompress.c
> +++ b/lib/lz4/lz4_decompress.c
> @@ -481,7 +481,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
> 
> /* ===== Instantiate a few more decoding cases, used more than once. ===== */
> 
> -int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
> +static int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
> 				      int compressedSize, int maxOutputSize)
> {
> 	return LZ4_decompress_generic(source, dest,
> -- 
> 2.31.1
> 

Reviewed-by: Nick Terrell <terrelln@...com>

This looks good to me! LZ4_decompress_safe_withPrefix64k() is a deprecated
function in the upstream LZ4 API, which isn’t exposed in the kernel API, so can
definitely be marked static.

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ