This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] crypt: Use internal names for the SHA-2 block functions
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 28 Oct 2016 11:31:45 -0200
- Subject: Re: [PATCH] crypt: Use internal names for the SHA-2 block functions
- Authentication-results: sourceware.org; auth=none
- References: <e9d4595b-01f8-afca-2265-9e2c2ed38d72@redhat.com>
On 28/10/2016 10:57, Florian Weimer wrote:
> I have not been able to test the SPARC bits so far, but they look reasonably safe to me.
> --- a/sysdeps/sparc/sparc64/multiarch/sha256-block.c
> +++ b/sysdeps/sparc/sparc64/multiarch/sha256-block.c
> @@ -1,12 +1,12 @@
> #include <sparc-ifunc.h>
>
> -#define sha256_process_block sha256_process_block_generic
> -extern void sha256_process_block_generic (const void *buffer, size_t len,
> - struct sha256_ctx *ctx);
> +#define __sha256_process_block __sha256_process_block_generic
> +extern void __sha256_process_block_generic (const void *buffer, size_t len,
> + struct sha256_ctx *ctx);
>
> #include <crypt/sha256-block.c>
>
> -#undef sha256_process_block
> +#undef __sha256_process_block
>
> extern void __sha256_process_block_crop (const void *buffer, size_t len,
> struct sha256_ctx *ctx);
> @@ -25,6 +25,8 @@ static bool cpu_supports_sha256(int hwcap)
> return false;
> }
>
> -extern void sha256_process_block (const void *buffer, size_t len,
> - struct sha256_ctx *ctx);
> -sparc_libc_ifunc(sha256_process_block, cpu_supports_sha256(hwcap) ? __sha256_process_block_crop : sha256_process_block_generic);
> +extern void __sha256_process_block (const void *buffer, size_t len,
> + struct sha256_ctx *ctx);
> +sparc_libc_ifunc (__sha256_process_block,
> + cpu_supports_sha256(hwcap) ? __sha256_process_block_crop
> + : sha256_process_block_generic);
It should __sha256_process_block_generic here. Also, if we now aiming
for namespace clean shouldn't we also add a conform test for crypt.h
header?