[PATCH] crypt: Use internal names for the SHA-2 block functions

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Oct 28 13:32:00 GMT 2016



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?



More information about the Libc-alpha mailing list