aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-17crypto: hash - fix incorrect HASH_MAX_DESCSIZEEric Biggers2-1/+9
The "hmac(sha3-224-generic)" algorithm has a descsize of 368 bytes, which is greater than HASH_MAX_DESCSIZE (360) which is only enough for sha3-224-generic. The check in shash_prepare_alg() doesn't catch this because the HMAC template doesn't set descsize on the algorithms, but rather sets it on each individual HMAC transform. This causes a stack buffer overflow when SHASH_DESC_ON_STACK() is used with hmac(sha3-224-generic). Fix it by increasing HASH_MAX_DESCSIZE to the real maximum. Also add a sanity check to hmac_init(). This was detected by the improved crypto self-tests in v5.2, by loading the tcrypt module with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y enabled. I didn't notice this bug when I ran the self-tests by requesting the algorithms via AF_ALG (i.e., not using tcrypt), probably because the stack layout differs in the two cases and that made a difference here. KASAN report: BUG: KASAN: stack-out-of-bounds in memcpy include/linux/string.h:359 [inline] BUG: KASAN: stack-out-of-bounds in shash_default_import+0x52/0x80 crypto/shash.c:223 Write of size 360 at addr ffff8880651defc8 by task insmod/3689 CPU: 2 PID: 3689 Comm: insmod Tainted: G E 5.1.0-10741-g35c99ffa20edd #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x86/0xc5 lib/dump_stack.c:113 print_address_description+0x7f/0x260 mm/kasan/report.c:188 __kasan_report+0x144/0x187 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x137/0x190 mm/kasan/generic.c:191 memcpy+0x37/0x50 mm/kasan/common.c:125 memcpy include/linux/string.h:359 [inline] shash_default_import+0x52/0x80 crypto/shash.c:223 crypto_shash_import include/crypto/hash.h:880 [inline] hmac_import+0x184/0x240 crypto/hmac.c:102 hmac_init+0x96/0xc0 crypto/hmac.c:107 crypto_shash_init include/crypto/hash.h:902 [inline] shash_digest_unaligned+0x9f/0xf0 crypto/shash.c:194 crypto_shash_digest+0xe9/0x1b0 crypto/shash.c:211 generate_random_hash_testvec.constprop.11+0x1ec/0x5b0 crypto/testmgr.c:1331 test_hash_vs_generic_impl+0x3f7/0x5c0 crypto/testmgr.c:1420 __alg_test_hash+0x26d/0x340 crypto/testmgr.c:1502 alg_test_hash+0x22e/0x330 crypto/testmgr.c:1552 alg_test.part.7+0x132/0x610 crypto/testmgr.c:4931 alg_test+0x1f/0x40 crypto/testmgr.c:4952 Fixes: b68a7ec1e9a3 ("crypto: hash - Remove VLA usage") Reported-by: Corentin Labbe <[email protected]> Cc: <[email protected]> # v4.20+ Cc: Kees Cook <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Kees Cook <[email protected]> Tested-by: Corentin Labbe <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-17crypto: caam - fix typo in i.MX6 devices list for errataIuliana Prodan1-1/+1
Fix a typo in the list of i.MX6 devices affected by an issue wherein AXI bus transactions may not occur in the correct order. Fixes: 33d69455e402 ("crypto: caam - limit AXI pipeline to a depth of 1") Signed-off-by: Iuliana Prodan <[email protected]> Reviewed-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09Revert "crypto: caam/jr - Remove extra memory barrier during job ring dequeue"Herbert Xu2-9/+1
This reverts commit bbfcac5ff5f26aafa51935a62eb86b6eacfe8a49. It caused a crash regression on powerpc: https://lore.kernel.org/linux-crypto/[email protected]/ Signed-off-by: Herbert Xu <[email protected]>
2019-05-09crypto: caam - fix caam_dump_sg that iterates through scatterlistIuliana Prodan1-1/+1
Fix caam_dump_sg by correctly determining the next scatterlist entry in the list. Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump") Signed-off-by: Iuliana Prodan <[email protected]> Reviewed-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09crypto: caam - fix DKP detection logicHerbert Xu3-5/+19
The detection for DKP (Derived Key Protocol) relied on the value of the setkey function. This was broken by the recent change which added des3_aead_setkey. This patch fixes this by introducing a new flag for DKP and setting that where needed. Fixes: 1b52c40919e6 ("crypto: caam - Forbid 2-key 3DES in FIPS mode") Reported-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Tested-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09MAINTAINERS: Maintainer for Chelsio crypto driverAtul Gupta1-1/+1
Modified the maintainer name Signed-off-by: Atul Gupta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09crypto: chelsio - count incomplete block in IVAtul Gupta1-2/+2
The partial block should count as one and appropriately appended to IV. eg 499B for AES CTR should count 32 block than 31 and correct count value is updated in iv out. Signed-off-by: Atul Gupta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09crypto: chelsio - Fix softlockup with heavy I/OAtul Gupta2-14/+3
removed un-necessary lock_chcr_dev to protect device state DETACH. lock is not required to protect I/O count Signed-off-by: Atul Gupta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-09crypto: chelsio - Fix NULL pointer dereferenceAtul Gupta1-1/+2
Do not request FW to generate cidx update if there is less space in tx queue to post new request. SGE DBP 1 pidx increment too large BUG: unable to handle kernel NULL pointer dereference at 0000000000000124 SGE error for queue 101 Signed-off-by: Atul Gupta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: ccree - use a proper le32 type for le32 valGilad Ben-Yossef1-1/+1
We build an explicit little endian value from the IDR register values. Use a proper le32 type to mark the var as such to satisfy Sparse. Signed-off-by: Gilad Ben-Yossef <[email protected]> Reported-by: kbuild test robot <[email protected]> Fixes: dcf6285d18ea1 ("crypto: ccree - add CID and PID support") Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: ccree - remove set but not used variable 'du_size'YueHaibing1-8/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/ccree/cc_cipher.c: In function cc_setup_key_desc: drivers/crypto/ccree/cc_cipher.c:645:15: warning: variable du_size set but not used [-Wunused-but-set-variable] It is never used since introduction in commit dd8486c75085 ("crypto: ccree - move key load desc. before flow desc.") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: ccree - Make cc_sec_disable staticYueHaibing1-1/+1
Fix sparse warning: drivers/crypto/ccree/cc_driver.c:37:6: warning: symbol 'cc_sec_disable' was not declared. Should it be static? Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: ccree - fix spelling mistake "protedcted" -> "protected"Colin Ian King1-1/+1
There is a spelling mistake in a dev_dbg message, fix it. Signed-off-by: Colin Ian King <[email protected]> Acked-By: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: caam/qi2 - generate hash keys in-placeHoria Geantă1-26/+15
Commit 307244452d3d ("crypto: caam - generate hash keys in-place") fixed ahash implementation in caam/jr driver such that user-provided key buffer is not DMA mapped, since it's not guaranteed to be DMAable. Apply a similar fix for caam/qi2 driver. Cc: <[email protected]> # v4.20+ Fixes: 3f16f6c9d632 ("crypto: caam/qi2 - add support for ahash algorithms") Signed-off-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: caam/qi2 - fix DMA mapping of stack memoryHoria Geantă2-68/+45
Commits c19650d6ea99 ("crypto: caam - fix DMA mapping of stack memory") and 65055e210884 ("crypto: caam - fix hash context DMA unmap size") fixed the ahash implementation in caam/jr driver such that req->result is not DMA-mapped (since it's not guaranteed to be DMA-able). Apply a similar fix for ahash implementation in caam/qi2 driver. Cc: <[email protected]> # v4.20+ Fixes: 3f16f6c9d632 ("crypto: caam/qi2 - add support for ahash algorithms") Signed-off-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: caam/qi2 - fix zero-length buffer DMA mappingHoria Geantă1-7/+18
Commit 04e6d25c5bb2 ("crypto: caam - fix zero-length buffer DMA mapping") fixed an issue in caam/jr driver where ahash implementation was DMA mapping a zero-length buffer. Current commit applies a similar fix for caam/qi2 driver. Cc: <[email protected]> # v4.20+ Fixes: 3f16f6c9d632 ("crypto: caam/qi2 - add support for ahash algorithms") Signed-off-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: stm32/cryp - update to return iv_outLionel Debieve1-0/+20
The kernel crypto API request output the next IV data to IV buffer for CBC implementation. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: stm32/cryp - remove request mutex protectionLionel Debieve1-19/+7
Mutex is badly used between threaded irq and driver. This mutex must be removed as the framework must ensure that requests must be serialized to avoid issue. Rework req to avoid crash during finalize by fixing the NULL pointer issue. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: stm32/cryp - add weak key check for DESLionel Debieve2-2/+12
Add weak key test for des functions calling the generic des_ekey. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: atmel - remove set but not used variable 'alg_name'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_setkey': drivers/crypto/atmel-tdes.c:803:14: warning: variable 'alg_name' set but not used [-Wunused-but-set-variable] It is not used any more since commit 52ea3cd2917b ("crypto: atmel - Forbid 2-key 3DES in FIPS mode") Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Nicolas Ferre <[email protected]> Reviewed-by: Tudor Ambarus <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: picoxcell - Use dev_get_drvdata()Kefeng Wang1-1/+1
Using dev_get_drvdata directly. Cc: Jamie Iles <[email protected]> Cc: Herbert Xu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Kefeng Wang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: crypto4xx - get rid of redundant using_sd variableChristian Lamparter2-5/+2
using_sd is used as a stand-in for sa_command_0.bf.scatter that we need to set anyway, so we might as well just prevent double-accounting. Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: crypto4xx - use sync skcipher for fallbackChristian Lamparter3-15/+10
This replaces struct crypto_skcipher and the extra request size with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: crypto4xx - fix cfb and ofb "overran dst buffer" issuesChristian Lamparter1-10/+21
Currently, crypto4xx CFB and OFB AES ciphers are failing testmgr's test vectors. |cfb-aes-ppc4xx encryption overran dst buffer on test vector 3, cfg="in-place" |ofb-aes-ppc4xx encryption overran dst buffer on test vector 1, cfg="in-place" This is because of a very subtile "bug" in the hardware that gets indirectly mentioned in 18.1.3.5 Encryption/Decryption of the hardware spec: the OFB and CFB modes for AES are listed there as operation modes for >>> "Block ciphers" <<<. Which kind of makes sense, but we would like them to be considered as stream ciphers just like the CTR mode. To workaround this issue and stop the hardware from causing "overran dst buffer" on crypttexts that are not a multiple of 16 (AES_BLOCK_SIZE), we force the driver to use the scatter buffers as the go-between. As a bonus this patch also kills redundant pd_uinfo->num_gd and pd_uinfo->num_sd setters since the value has already been set before. Cc: [email protected] Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-03crypto: crypto4xx - fix ctr-aes missing output IVChristian Lamparter1-3/+9
Commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV") caused the crypto4xx driver to produce the following error: | ctr-aes-ppc4xx encryption test failed (wrong output IV) | on test vector 0, cfg="in-place" This patch fixes this by reworking the crypto4xx_setkey_aes() function to: - not save the iv for ECB (as per 18.2.38 CRYP0_SA_CMD_0: "This bit mut be cleared for DES ECB mode or AES ECB mode, when no IV is used.") - instruct the hardware to save the generated IV for all other modes of operations that have IV and then supply it back to the callee in pretty much the same way as we do it for cbc-aes already. - make it clear that the DIR_(IN|OUT)BOUND is the important bit that tells the hardware to encrypt or decrypt the data. (this is cosmetic - but it hopefully prevents me from getting confused again). - don't load any bogus hash when we don't use any hash operation to begin with. Cc: [email protected] Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ecrdsa - select ASN1 and OID_REGISTRY for EC-RDSAVitaly Chikunov1-0/+2
Fix undefined symbol issue in ecrdsa_generic module when ASN1 or OID_REGISTRY aren't enabled in the config by selecting these options for CRYPTO_ECRDSA. ERROR: "asn1_ber_decoder" [crypto/ecrdsa_generic.ko] undefined! ERROR: "look_up_OID" [crypto/ecrdsa_generic.ko] undefined! Reported-by: Randy Dunlap <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: Vitaly Chikunov <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ux500 - use ccflags-y instead of CFLAGS_<basename>.oMasahiro Yamada1-5/+1
Instead of adding CFLAGS_<basename>.o to every file, let's use ccflags-y, which is effective for all C files in the directory. No behavior change. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - handle tee fips error during power management resumeOfir Drang1-1/+3
in order to support cryptocell tee fips error that may occurs while cryptocell ree is suspended, an cc_tee_handle_fips_error call added to the cc_pm_resume function. Signed-off-by: Ofir Drang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - add function to handle cryptocell tee fips errorOfir Drang2-8/+17
Adds function that checks if cryptocell tee fips error occurred and in such case triggers system error through kernel panic. Change fips function to use this new routine. Signed-off-by: Ofir Drang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - HOST_POWER_DOWN_EN should be the last CC access during suspendOfir Drang1-1/+1
During power management suspend the driver need to prepare the device for the power down operation and as a last indication write to the HOST_POWER_DOWN_EN register which signals to the hardware that The ccree is ready for power down. Signed-off-by: Ofir Drang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - remove cc7x3 obsoleted AXIM configsOfir Drang1-5/+8
AXIM configuration register modified in cc7x3 and no longer includes AXI interrupt masking fields. Signed-off-by: Ofir Drang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - pm resume first enable the source clkOfir Drang1-2/+3
On power management resume function first enable the device clk source to allow access to the device registers. Signed-off-by: Ofir Drang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - don't map AEAD key and IV on stackGilad Ben-Yossef3-4/+23
The AEAD authenc key and IVs might be passed to us on stack. Copy it to a slab buffer before mapping to gurantee proper DMA mapping. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - don't map MAC key on stackGilad Ben-Yossef1-3/+21
The MAC hash key might be passed to us on stack. Copy it to a slab buffer before mapping to gurantee proper DMA mapping. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - allow more AEAD assoc data fragmentsGilad Ben-Yossef1-1/+1
Increase the maximum supported AEAD associated data fragments. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - use correct internal state sizes for exportGilad Ben-Yossef1-2/+2
We were computing the size of the import buffer based on the digest size but the 318 and 224 byte variants use 512 and 256 bytes internal state sizes respectfully, thus causing the import buffer to overrun. Fix it by using the right sizes. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - zap entire sg on aead request unmapGilad Ben-Yossef1-11/+2
We were trying to be clever zapping out of the cache only the required length out of scatter list on AEAD request completion and getting it wrong. As Knuth said: "when in douby, use brute force". Zap the whole length of the scatter list. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - make AEAD sgl iterator well behavedGilad Ben-Yossef1-38/+17
Fix some scatter list interation code was not handling scatter lists being shorter than expected in a graceful manner. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - don't mangle the request assoclenGilad Ben-Yossef3-26/+37
We were mangling the request struct assoclen field. Fix it by keeping an internal version and working on it. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - simplify AEAD ICV addr calculationGilad Ben-Yossef1-17/+11
The function cc_prepare_aead_data_dlli() which calculates ICV addresses was needlessly complicate it. This patch simplifies it without altering its functionality. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - simplify fragment ICV detectionGilad Ben-Yossef2-86/+21
The code detecting whether the ICV is fragmented was overly complex and limited the number of fragments an ICV may be comprised of with no reason in the current code, casuing the new testmgr tests to fail. This patch removes this legacy limitation and greatly simplifies the code. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - remove unused definesGilad Ben-Yossef1-4/+0
Remove unused definitions from AEAD driver code. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - do not copy zero size MLLI tableGilad Ben-Yossef1-2/+2
When we are given a 0 sized cryptlen and assoclen in a scatterlist with two entries we were falsely trying to create a zero length MLLI table, causing the HW to choke. Don't try to copy a zero sized MLLI table. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - zero out internal struct before useGilad Ben-Yossef1-0/+16
We did not zero out the internal struct before use causing problem in some rare error code paths. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - copyright header updateGilad Ben-Yossef25-24/+25
This sacrificial copyright header update is offered to the legal department as atonement for any changes made in this driver files in the course of the current year which have not been duly recorded as such. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - use std api when possibleGilad Ben-Yossef1-9/+5
Move to use the std api sg_nents_for_len() when we do not in fact require the extra information about the number of bytes in the last entry provided by the in-driver variant cc_get_sgl_nents(). This also resolves a Coverity warning cause by us not using the output value. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - use devm_kzalloc for device dataGilad Ben-Yossef2-6/+3
Move some remaining device data allocation to the safer devm_* interface. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - fix mem leak on error pathGilad Ben-Yossef1-6/+3
Fix a memory leak on the error path of IV generation code. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - fix typo in debugfs error pathGilad Ben-Yossef1-1/+1
Fix a typo in debugfs interface error path which can result in a panic following a memory allocation failure. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-25crypto: ccree - remove special handling of chained sgGilad Ben-Yossef1-76/+22
We were handling chained scattergather lists with specialized code needlessly as the regular sg APIs handle them just fine. The code handling this also had an (unused) code path with a use-before-init error, flagged by Coverity. Remove all special handling of chained sg and leave their handling to the regular sg APIs. Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>