<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"纯文本 Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
span.Char
{mso-style-name:"纯文本 Char";
mso-style-priority:99;
mso-style-link:纯文本;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-US">Hi Eric:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Thank you very much for your kind reply, and I am very sorry for not describing the background clearly.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Actually, I wanted to test the sha3 algorithm in kernel 5.10, but crypto_user02.c return "no viable algorithm found" as follows:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><img width="495" height="164" id="图片_x0020_1" src="cid:image001.png@01D80618.14306F90"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">So I add sha3 to crypto_user02.c and run again, at the same time, according to the latest linux kernel encryption module, add several hash algorithms, as follows:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><img width="711" height="227" id="图片_x0020_2" src="cid:image002.png@01D80618.F702D790"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Best Regards<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Yehai Wen<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">-----</span><span style="font-family:宋体">邮件原件</span><span lang="EN-US">-----<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:宋体">发件人</span><span lang="EN-US">: Eric Biggers [mailto:ebiggers@kernel.org]
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:宋体">发送时间</span><span lang="EN-US">: 2022</span><span style="font-family:宋体">年</span><span lang="EN-US">1</span><span style="font-family:宋体">月</span><span lang="EN-US">5</span><span style="font-family:宋体">日</span><span lang="EN-US">
23:14<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:宋体">收件人</span><span lang="EN-US">: wenyehai <wenyehai@huawei.com><o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:宋体">抄送</span><span lang="EN-US">: ltp@lists.linux.it<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:宋体">主题</span><span lang="EN-US">: Re: [LTP] [PATCH] add several hash algorithms for crypto/crypto_user02.c<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">On Tue, Jan 04, 2022 at 05:15:29PM +0800, wenyehai via ltp wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> kernel/crypto/crypto_user02.c: add several hash algorithms according
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> to the latest linux kernel encryption module<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Signed-off-by: Yehai Wen <wenyehai@huawei.com><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ---<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> testcases/kernel/crypto/crypto_user02.c | 10 +++++++++-<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> 1 file changed, 9 insertions(+), 1 deletion(-)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> diff --git a/testcases/kernel/crypto/crypto_user02.c
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> b/testcases/kernel/crypto/crypto_user02.c<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> index 717b297..afaff5d 100644<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> --- a/testcases/kernel/crypto/crypto_user02.c<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> +++ b/testcases/kernel/crypto/crypto_user02.c<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> @@ -40,7 +40,15 @@ static const char * const ALGORITHM_CANDIDATES[] = {<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> "hmac(sha256-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> "hmac(sha384-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> "hmac(md5-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> - "hmac(sm3-generic)"<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sm3-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sha512-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(rmd160-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sha3-224-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sha3-256-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sha3-384-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(sha3-512-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(streebog256-generic)",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> + "hmac(streebog512-generic)"<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> };<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">There's no harm in listing more algorithms here. Just to avoid any misunderstanding though, are you expecting this test to test those algorithms?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">This test just uses the first available algorithm listed; it's a regression test for a bug in the crypto_user API, and not a test for the algorithms themselves.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">So, listing more algorithms here doesn't magically provide test coverage for them. If what you're looking for is an LTP test that tests that certain algorithms are working correctly, then such a test would need to
be written.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">- Eric<o:p></o:p></span></p>
</div>
</body>
</html>