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:   Thu, 8 Apr 2021 17:20:15 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Zhao Xuehui <zhaoxuehui1@...wei.com>,
        Nick Terrell <terrelln@...com>
Cc:     "Gustavo A . R . Silva" <gustavoars@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Miguel Ojeda <ojeda@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, yangjihong1@...wei.com,
        zhangjinhao2@...wei.com
Subject: Re: [PATCH -next] lib: zstd: Make symbol 'HUF_compressWeights_wksp' static

On Thu, Apr 8, 2021 at 5:55 AM Zhao Xuehui <zhaoxuehui1@...wei.com> wrote:
>
> The symbol 'HUF_compressWeights_wksp' is not used outside of
> huf_compress.c, so this commit marks it static.

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

Quite a few other functions are declared in a header, but I don't see
any existing callers in tree.  I wonder if the maintainer could
consider cleaning these up so that we don't retain them in binaries
without dead code elimination enabled, or if there's a need to keep
this code in line with an external upstream codebase?

>
> Signed-off-by: Zhao Xuehui <zhaoxuehui1@...wei.com>
> ---
>  lib/zstd/huf_compress.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/zstd/huf_compress.c b/lib/zstd/huf_compress.c
> index fd32838c185f..1e5e001c3d41 100644
> --- a/lib/zstd/huf_compress.c
> +++ b/lib/zstd/huf_compress.c
> @@ -79,7 +79,8 @@ unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxS
>   * Note : all elements within weightTable are supposed to be <= HUF_TABLELOG_MAX.
>   */
>  #define MAX_FSE_TABLELOG_FOR_HUFF_HEADER 6
> -size_t HUF_compressWeights_wksp(void *dst, size_t dstSize, const void *weightTable, size_t wtSize, void *workspace, size_t workspaceSize)
> +static size_t HUF_compressWeights_wksp(void *dst, size_t dstSize, const void *weightTable,
> +                                      size_t wtSize, void *workspace, size_t workspaceSize)
>  {
>         BYTE *const ostart = (BYTE *)dst;
>         BYTE *op = ostart;
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ