Commit 2368a9426fe8320e3d23b0584d861ebeb2aa80f2
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes three issues: - if ccp is loaded on a machine without ccp, it will incorrectly activate causing all requests to fail. Fixed by preventing ccp from loading if hardware isn't available. - not all IRQs were enabled for the qat driver, leading to potential stalls when it is used - disabled buggy AVX CTR implementation in aesni" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: aesni - disable "by8" AVX CTR optimization crypto: ccp - Check for CCP before registering crypto algs crypto: qat - Enable all 32 IRQs
Showing 5 changed files Side-by-side Diff
arch/x86/crypto/aesni-intel_glue.c
... | ... | @@ -481,7 +481,7 @@ |
481 | 481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); |
482 | 482 | } |
483 | 483 | |
484 | -#ifdef CONFIG_AS_AVX | |
484 | +#if 0 /* temporary disabled due to failing crypto tests */ | |
485 | 485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, |
486 | 486 | const u8 *in, unsigned int len, u8 *iv) |
487 | 487 | { |
... | ... | @@ -1522,7 +1522,7 @@ |
1522 | 1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; |
1523 | 1523 | } |
1524 | 1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; |
1525 | -#ifdef CONFIG_AS_AVX | |
1525 | +#if 0 /* temporary disabled due to failing crypto tests */ | |
1526 | 1526 | if (cpu_has_avx) { |
1527 | 1527 | /* optimize performance of ctr mode encryption transform */ |
1528 | 1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; |
drivers/crypto/ccp/ccp-crypto-main.c
drivers/crypto/ccp/ccp-dev.c
... | ... | @@ -55,6 +55,20 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | + * ccp_present - check if a CCP device is present | |
59 | + * | |
60 | + * Returns zero if a CCP device is present, -ENODEV otherwise. | |
61 | + */ | |
62 | +int ccp_present(void) | |
63 | +{ | |
64 | + if (ccp_get_device()) | |
65 | + return 0; | |
66 | + | |
67 | + return -ENODEV; | |
68 | +} | |
69 | +EXPORT_SYMBOL_GPL(ccp_present); | |
70 | + | |
71 | +/** | |
58 | 72 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
59 | 73 | * |
60 | 74 | * @cmd: ccp_cmd struct to be processed |
drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | #define ADF_DH895XCC_ETR_MAX_BANKS 32 |
67 | 67 | #define ADF_DH895XCC_SMIAPF0_MASK_OFFSET (0x3A000 + 0x28) |
68 | 68 | #define ADF_DH895XCC_SMIAPF1_MASK_OFFSET (0x3A000 + 0x30) |
69 | -#define ADF_DH895XCC_SMIA0_MASK 0xFFFF | |
69 | +#define ADF_DH895XCC_SMIA0_MASK 0xFFFFFFFF | |
70 | 70 | #define ADF_DH895XCC_SMIA1_MASK 0x1 |
71 | 71 | /* Error detection and correction */ |
72 | 72 | #define ADF_DH895XCC_AE_CTX_ENABLES(i) (i * 0x1000 + 0x20818) |
include/linux/ccp.h
... | ... | @@ -27,6 +27,13 @@ |
27 | 27 | defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) |
28 | 28 | |
29 | 29 | /** |
30 | + * ccp_present - check if a CCP device is present | |
31 | + * | |
32 | + * Returns zero if a CCP device is present, -ENODEV otherwise. | |
33 | + */ | |
34 | +int ccp_present(void); | |
35 | + | |
36 | +/** | |
30 | 37 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
31 | 38 | * |
32 | 39 | * @cmd: ccp_cmd struct to be processed |
... | ... | @@ -52,6 +59,11 @@ |
52 | 59 | int ccp_enqueue_cmd(struct ccp_cmd *cmd); |
53 | 60 | |
54 | 61 | #else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ |
62 | + | |
63 | +static inline int ccp_present(void) | |
64 | +{ | |
65 | + return -ENODEV; | |
66 | +} | |
55 | 67 | |
56 | 68 | static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) |
57 | 69 | { |