History

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

Linus Torvalds committed 10 months ago

Commit 71432032 parents 9c7ef20 74d74bb4 files · +5 −4Browse files

Unified · Split

4 files
  1. MAINTAINERS +1 −0
  2. lib/crypto/aes.c +2 −2
  3. lib/crypto/tests/polyval_kunit.c +1 −1
  4. scripts/crypto/gen-hash-testvecs.py +1 −1
MAINTAINERS+1−0
@@ -6708,6 +6708,7 @@ S: Maintained · 6707 unmodified lines
6708T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-next6708T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-next
6709T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-fixes6709T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git libcrypto-fixes
6710F: lib/crypto/6710F: lib/crypto/
6711F: scripts/crypto/
6711 6712
6712CRYPTO SPEED TEST COMPARE6713CRYPTO SPEED TEST COMPARE
6713M: Wang Jinchao <wangjinchao@xfusion.com>6714M: Wang Jinchao <wangjinchao@xfusion.com>
lib/crypto/aes.c+2−2
@@ -13,7 +13,7 @@ · 12 unmodified lines
13 * Emit the sbox as volatile const to prevent the compiler from doing13 * Emit the sbox as volatile const to prevent the compiler from doing
14 * constant folding on sbox references involving fixed indexes.14 * constant folding on sbox references involving fixed indexes.
15 */15 */
16static volatile const u8 __cacheline_aligned aes_sbox[] = {16static volatile const u8 ____cacheline_aligned aes_sbox[] = {
17 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,17 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
18 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,18 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
19 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,19 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
@@ -48,7 +48,7 @@ static volatile const u8 __cacheline_aligned aes_sbox[] = { · 28 unmodified lines
48 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16,48 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16,
49};49};
50 50
51static volatile const u8 __cacheline_aligned aes_inv_sbox[] = {51static volatile const u8 ____cacheline_aligned aes_inv_sbox[] = {
52 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38,52 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38,
53 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,53 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
54 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,54 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
lib/crypto/tests/polyval_kunit.c+1−1
@@ -183,7 +183,7 @@ static void test_polyval_preparekey_in_irqs(struct kunit *test) · 182 unmodified lines
183 183
184 rand_bytes(state.raw_key, sizeof(state.raw_key));184 rand_bytes(state.raw_key, sizeof(state.raw_key));
185 polyval_preparekey(&state.expected_key, state.raw_key);185 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);
187}187}
188 188
189static int polyval_suite_init(struct kunit_suite *suite)189static int polyval_suite_init(struct kunit_suite *suite)
scripts/crypto/gen-hash-testvecs.py+1−1
@@ -118,7 +118,7 @@ def print_c_struct_u8_array_field(name, value): · 117 unmodified lines
118def alg_digest_size_const(alg):118def alg_digest_size_const(alg):
119 if alg.startswith('blake2'):119 if alg.startswith('blake2'):
120 return f'{alg.upper()}_HASH_SIZE'120 return f'{alg.upper()}_HASH_SIZE'
121 return f'{alg.upper().replace('-', '_')}_DIGEST_SIZE'121 return f"{alg.upper().replace('-', '_')}_DIGEST_SIZE"
122 122
123def gen_unkeyed_testvecs(alg):123def gen_unkeyed_testvecs(alg):
124 print('')124 print('')

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t