<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/crypto/tcrypt.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-04-14T10:59:34+00:00</updated>
<entry>
<title>crypto: api - Move low-level functions into algapi.h</title>
<updated>2023-04-14T10:59:34+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2023-04-03T04:48:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01f727cdc4dbecd36c6722977ff9535f16c11751'/>
<id>urn:sha1:01f727cdc4dbecd36c6722977ff9535f16c11751</id>
<content type='text'>
A number of low-level functions were exposed in crypto.h.  Move
them into algapi.h (and internal.h).

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - include larger key sizes in RFC4106 benchmark</title>
<updated>2023-01-20T10:29:31+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2022-12-14T17:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=425359aef47972b2d14e15b6702d60d86779af65'/>
<id>urn:sha1:425359aef47972b2d14e15b6702d60d86779af65</id>
<content type='text'>
RFC4106 wraps AES in GCM mode, and can be used with larger key sizes
than 128/160 bits, just like AES itself. So add these to the tcrypt
recipe so they will be benchmarked as well.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - Fix multibuffer skcipher speed test mem leak</title>
<updated>2022-11-25T09:39:18+00:00</updated>
<author>
<name>Zhang Yiqun</name>
<email>zhangyiqun@phytium.com.cn</email>
</author>
<published>2022-11-16T09:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1aa33fc8d4032227253ceb736f47c52b859d9683'/>
<id>urn:sha1:1aa33fc8d4032227253ceb736f47c52b859d9683</id>
<content type='text'>
In the past, the data for mb-skcipher test has been allocated
twice, that means the first allcated memory area is without
free, which may cause a potential memory leakage. So this
patch is to remove one allocation to fix this error.

Fixes: e161c5930c15 ("crypto: tcrypt - add multibuf skcipher...")
Signed-off-by: Zhang Yiqun &lt;zhangyiqun@phytium.com.cn&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - add SM4 cts-cbc/xts/xcbc test</title>
<updated>2022-11-04T09:34:21+00:00</updated>
<author>
<name>Tianjia Zhang</name>
<email>tianjia.zhang@linux.alibaba.com</email>
</author>
<published>2022-10-27T06:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c3836378dd578a0d510420c0f67818e8dc49f0e'/>
<id>urn:sha1:3c3836378dd578a0d510420c0f67818e8dc49f0e</id>
<content type='text'>
Added CTS-CBC/XTS/XCBC tests for SM4 algorithms, as well as
corresponding speed tests, this is to test performance-optimized
implementations of these modes.

Signed-off-by: Tianjia Zhang &lt;tianjia.zhang@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - Drop leading newlines from prints</title>
<updated>2022-11-04T09:33:22+00:00</updated>
<author>
<name>Anirudh Venkataramanan</name>
<email>anirudh.venkataramanan@intel.com</email>
</author>
<published>2022-10-26T19:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3513828cb8f6db714ee48b1559e6253a57ecf1f6'/>
<id>urn:sha1:3513828cb8f6db714ee48b1559e6253a57ecf1f6</id>
<content type='text'>
The top level print banners have a leading newline. It's not entirely
clear why this exists, but it makes it harder to parse tcrypt test output
using a script. Drop said newlines.

tcrypt output before this patch:

[...]
      testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption
[...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes)

tcrypt output with this patch:

[...] testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption
[...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes)

Signed-off-by: Anirudh Venkataramanan &lt;anirudh.venkataramanan@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - Drop module name from print string</title>
<updated>2022-11-04T09:33:22+00:00</updated>
<author>
<name>Anirudh Venkataramanan</name>
<email>anirudh.venkataramanan@intel.com</email>
</author>
<published>2022-10-26T19:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2ef563000aff04352a4aded7b2d2bf19a1674bf'/>
<id>urn:sha1:a2ef563000aff04352a4aded7b2d2bf19a1674bf</id>
<content type='text'>
The pr_fmt() define includes KBUILD_MODNAME, and so there's no need
for pr_err() to also print it. Drop module name from the print string.

Signed-off-by: Anirudh Venkataramanan &lt;anirudh.venkataramanan@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - Use pr_info/pr_err</title>
<updated>2022-11-04T09:33:22+00:00</updated>
<author>
<name>Anirudh Venkataramanan</name>
<email>anirudh.venkataramanan@intel.com</email>
</author>
<published>2022-10-26T19:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=837a99f59043c3505d69761575172da1d09220b5'/>
<id>urn:sha1:837a99f59043c3505d69761575172da1d09220b5</id>
<content type='text'>
Currently, there's mixed use of printk() and pr_info()/pr_err(). The latter
prints the module name (because pr_fmt() is defined so) but the former does
not. As a result there's inconsistency in the printed output. For example:

modprobe mode=211:

[...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes)
[...] test 1 (160 bit key, 64 byte blocks): 1 operation in 2336 cycles (64 bytes)

modprobe mode=215:

[...] tcrypt: test 0 (160 bit key, 16 byte blocks): 1 operation in 2173 cycles (16 bytes)
[...] tcrypt: test 1 (160 bit key, 64 byte blocks): 1 operation in 2241 cycles (64 bytes)

Replace all instances of printk() with pr_info()/pr_err() so that the
module name is printed consistently.

Signed-off-by: Anirudh Venkataramanan &lt;anirudh.venkataramanan@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - Use pr_cont to print test results</title>
<updated>2022-11-04T09:33:22+00:00</updated>
<author>
<name>Anirudh Venkataramanan</name>
<email>anirudh.venkataramanan@intel.com</email>
</author>
<published>2022-10-26T19:16:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdaeb224e2bf747942653e4f70226fcfe60fbf73'/>
<id>urn:sha1:fdaeb224e2bf747942653e4f70226fcfe60fbf73</id>
<content type='text'>
For some test cases, a line break gets inserted between the test banner
and the results. For example, with mode=211 this is the output:

[...]
      testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption
[...] test 0 (160 bit key, 16 byte blocks):
[...] 1 operation in 2373 cycles (16 bytes)

--snip--

[...]
      testing speed of gcm(aes) (generic-gcm-aesni) encryption
[...] test 0 (128 bit key, 16 byte blocks):
[...] 1 operation in 2338 cycles (16 bytes)

Similar behavior is seen in the following cases as well:

  modprobe tcrypt mode=212
  modprobe tcrypt mode=213
  modprobe tcrypt mode=221
  modprobe tcrypt mode=300 sec=1
  modprobe tcrypt mode=400 sec=1

This doesn't happen with mode=215:

[...] tcrypt:
              testing speed of multibuffer rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption
[...] tcrypt: test 0 (160 bit key, 16 byte blocks): 1 operation in 2215 cycles (16 bytes)

--snip--

[...] tcrypt:
              testing speed of multibuffer gcm(aes) (generic-gcm-aesni) encryption
[...] tcrypt: test 0 (128 bit key, 16 byte blocks): 1 operation in 2191 cycles (16 bytes)

This print inconsistency is because printk() is used instead of pr_cont()
in a few places. Change these to be pr_cont().

checkpatch warns that pr_cont() shouldn't be used. This can be ignored in
this context as tcrypt already uses pr_cont().

Signed-off-by: Anirudh Venkataramanan &lt;anirudh.venkataramanan@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - fix return value for multiple subtests</title>
<updated>2022-10-21T11:15:35+00:00</updated>
<author>
<name>Robert Elliott</name>
<email>elliott@hpe.com</email>
</author>
<published>2022-09-30T21:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=65c92cbb3f2365627a10cf97560d51e88fb4e588'/>
<id>urn:sha1:65c92cbb3f2365627a10cf97560d51e88fb4e588</id>
<content type='text'>
When a test mode invokes multiple tests (e.g., mode 0 invokes modes
1 through 199, and mode 3 tests three block cipher modes with des),
don't keep accumulating the return values with ret += tcrypt_test(),
which results in a bogus value if more than one report a nonzero
value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)).
Instead, keep track of the minimum return value reported by any
subtest.

Fixes: 4e033a6bc70f ("crypto: tcrypt - Do not exit on success in fips mode")
Signed-off-by: Robert Elliott &lt;elliott@hpe.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: tcrypt - add async speed test for aria cipher</title>
<updated>2022-09-24T08:14:44+00:00</updated>
<author>
<name>Taehee Yoo</name>
<email>ap420073@gmail.com</email>
</author>
<published>2022-09-16T12:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4b1ce72b5c9f7d5772b2f2d4efa25ef0e6fb576'/>
<id>urn:sha1:c4b1ce72b5c9f7d5772b2f2d4efa25ef0e6fb576</id>
<content type='text'>
In order to test for the performance of aria-avx implementation, it needs
an async speed test.
So, it adds async speed tests to the tcrypt.

Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
