lkml.org 
[lkml]   [2021]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] crypto: use SM3 instead of SM3_256
From
Hi James,

On 10/18/21 9:05 PM, James Bottomley wrote:
> On Sat, 2021-10-09 at 21:08 +0800, Tianjia Zhang wrote:
> [...]
>> diff --git a/include/uapi/linux/hash_info.h
>> b/include/uapi/linux/hash_info.h
>> index 74a8609fcb4d..1355525dd4aa 100644
>> --- a/include/uapi/linux/hash_info.h
>> +++ b/include/uapi/linux/hash_info.h
>> @@ -32,7 +32,7 @@ enum hash_algo {
>> HASH_ALGO_TGR_128,
>> HASH_ALGO_TGR_160,
>> HASH_ALGO_TGR_192,
>> - HASH_ALGO_SM3_256,
>> + HASH_ALGO_SM3,
>> HASH_ALGO_STREEBOG_256,
>> HASH_ALGO_STREEBOG_512,
>> HASH_ALGO__LAST
>
> This is another one you can't do: all headers in UAPI are exports to
> userspace and the definitions constitute an ABI. If you simply do a
> rename, every userspace program that uses the current definition will
> immediately break on compile. You could add HASH_ALGO_SM3, but you
> can't remove HASH_ALGO_SM3_256
>
> James
>

Correct, Thanks for pointing it out, redefining a macro is indeed a more
appropriate method.

Best regards,
Tianjia

\
 
 \ /
  Last update: 2021-10-19 11:35    [W:0.091 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site