Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: testmgr - remove crc32c context format test

This is no longer needed now that the code that used to directly access
the descriptor context of "crc32c" (libcrc32c and ext4) now just calls
crc32c(). Keep just the generic hash test.

Link: https://lore.kernel.org/r/20250531205937.63008-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+1 -54
+1 -54
crypto/testmgr.c
··· 3550 3550 return err; 3551 3551 } 3552 3552 3553 - static int alg_test_crc32c(const struct alg_test_desc *desc, 3554 - const char *driver, u32 type, u32 mask) 3555 - { 3556 - struct crypto_shash *tfm; 3557 - __le32 val; 3558 - int err; 3559 - 3560 - err = alg_test_hash(desc, driver, type, mask); 3561 - if (err) 3562 - return err; 3563 - 3564 - tfm = crypto_alloc_shash(driver, type, mask); 3565 - if (IS_ERR(tfm)) { 3566 - if (PTR_ERR(tfm) == -ENOENT) { 3567 - /* 3568 - * This crc32c implementation is only available through 3569 - * ahash API, not the shash API, so the remaining part 3570 - * of the test is not applicable to it. 3571 - */ 3572 - return 0; 3573 - } 3574 - printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: " 3575 - "%ld\n", driver, PTR_ERR(tfm)); 3576 - return PTR_ERR(tfm); 3577 - } 3578 - driver = crypto_shash_driver_name(tfm); 3579 - 3580 - do { 3581 - SHASH_DESC_ON_STACK(shash, tfm); 3582 - u32 *ctx = (u32 *)shash_desc_ctx(shash); 3583 - 3584 - shash->tfm = tfm; 3585 - 3586 - *ctx = 420553207; 3587 - err = crypto_shash_final(shash, (u8 *)&val); 3588 - if (err) { 3589 - printk(KERN_ERR "alg: crc32c: Operation failed for " 3590 - "%s: %d\n", driver, err); 3591 - break; 3592 - } 3593 - 3594 - if (val != cpu_to_le32(~420553207)) { 3595 - pr_err("alg: crc32c: Test failed for %s: %u\n", 3596 - driver, le32_to_cpu(val)); 3597 - err = -EINVAL; 3598 - } 3599 - } while (0); 3600 - 3601 - crypto_free_shash(tfm); 3602 - 3603 - return err; 3604 - } 3605 - 3606 3553 static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, 3607 3554 u32 type, u32 mask) 3608 3555 { ··· 4509 4562 } 4510 4563 }, { 4511 4564 .alg = "crc32c", 4512 - .test = alg_test_crc32c, 4565 + .test = alg_test_hash, 4513 4566 .fips_allowed = 1, 4514 4567 .suite = { 4515 4568 .hash = __VECS(crc32c_tv_template)