Skip to content

Commit 7143203

Browse files
committed
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library fixes from Eric Biggers: - A couple more fixes for the lib/crypto KUnit tests - Fix missing MMU protection for the AES S-box * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto: aes: Fix missing MMU protection for AES S-box MAINTAINERS: add test vector generation scripts to "CRYPTO LIBRARY" lib/crypto: tests: Fix syntax error for old python versions lib/crypto: tests: polyval_kunit: Increase iterations for preparekey in IRQs
2 parents 9c7ef20 + 74d74bb commit 7143203

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6708,6 +6708,7 @@ S: Maintained
67086708
T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-next
67096709
T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-fixes
67106710
F: lib/crypto/
6711+
F: scripts/crypto/
67116712

67126713
CRYPTO SPEED TEST COMPARE
67136714
M: Wang Jinchao <wangjinchao@xfusion.com>

lib/crypto/aes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Emit the sbox as volatile const to prevent the compiler from doing
1414
* constant folding on sbox references involving fixed indexes.
1515
*/
16-
static volatile const u8 __cacheline_aligned aes_sbox[] = {
16+
static volatile const u8 ____cacheline_aligned aes_sbox[] = {
1717
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
1818
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
1919
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
@@ -48,7 +48,7 @@ static volatile const u8 __cacheline_aligned aes_sbox[] = {
4848
0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16,
4949
};
5050

51-
static volatile const u8 __cacheline_aligned aes_inv_sbox[] = {
51+
static volatile const u8 ____cacheline_aligned aes_inv_sbox[] = {
5252
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38,
5353
0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
5454
0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,

lib/crypto/tests/polyval_kunit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void test_polyval_preparekey_in_irqs(struct kunit *test)
183183

184184
rand_bytes(state.raw_key, sizeof(state.raw_key));
185185
polyval_preparekey(&state.expected_key, state.raw_key);
186-
kunit_run_irq_test(test, polyval_irq_test_func, 20000, &state);
186+
kunit_run_irq_test(test, polyval_irq_test_func, 200000, &state);
187187
}
188188

189189
static int polyval_suite_init(struct kunit_suite *suite)

scripts/crypto/gen-hash-testvecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def print_c_struct_u8_array_field(name, value):
118118
def alg_digest_size_const(alg):
119119
if alg.startswith('blake2'):
120120
return f'{alg.upper()}_HASH_SIZE'
121-
return f'{alg.upper().replace('-', '_')}_DIGEST_SIZE'
121+
return f"{alg.upper().replace('-', '_')}_DIGEST_SIZE"
122122

123123
def gen_unkeyed_testvecs(alg):
124124
print('')

0 commit comments

Comments
 (0)