aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto
AgeCommit message (Collapse)AuthorFilesLines
2013-05-28crypto: hifn_795x - Pass correct pointer to free_irq()Lars-Peter Clausen1-2/+2
free_irq() expects the same pointer that was passed to request_irq(), otherwise the IRQ is not freed. The issue was found using the following coccinelle script: <smpl> @r1@ type T; T devid; @@ request_irq(..., devid) @r2@ type r1.T; T devid; position p; @@ free_irq@p(..., devid) @@ position p != r2.p; @@ *free_irq@p(...) </smpl> Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: dcp - Added support for Freescale's DCP co-processorTobias Rauter3-0/+936
This patch enables the DCP crypto functionality on imx28. Currently, only aes-128-cbc is supported. Moreover, the dcpboot misc-device, which is used by Freescale's SDK tools and uses a non-software-readable OTP-key, is added. Changes of v2: - ring buffer for hardware-descriptors - use of ablkcipher walk - OTP key encryption/decryption via misc-device (compatible to Freescale-SDK) - overall cleanup The DCP is also capable of sha1/sha256 but I won't be able to add that anytime soon. Tested with built-in runtime-self-test, tcrypt and openssl via cryptodev 1.6 on imx28-evk and a custom built imx28-board. Signed-off-by: Tobias Rauter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - add missing flag for the LOAD/STORE commandsAndrei Varvara1-0/+1
Add Class Context SRC / DEST flags for the LOAD & STORE commands Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Add define for Adjust Output Frame Length in PDBAndrei Varvara1-0/+1
Add define for "Adjust Output Frame Length" in order to set the AOFL bit in the IPsec ESP Decapsulation PDB. Signed-off-by: Anca-Jeanina Floarea <[email protected]> Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Add defines for CAAM commandsAndrei Varvara1-0/+9
add defines for: append load immediate command setting SEQ LIODN equal to the Non-SEQ LIODN for the job replace job descriptor command Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Add defines for overwriting Descriptor's memoryAndrei Varvara1-0/+4
Store command has options to overwrite the Job Desc, Shared Desc or the entire Descriptor in memory, using the address from which the Descriptor was fetched. Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Add new macros for building extended SEC descriptors (> 64 words)Andrei Varvara2-1/+56
added all supported math funtion on 8 byte boundary with immediate flag bit set automatically added MATH_SRC0_DPOVRD & MATH_SRC1_DPOVRD The function/defines above are needed for creating descriptors longer than 64 words Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Add MATH command to support shld functionAndrei Varvara1-0/+2
Perform 32-bit left shift of DEST and concatenate with left 32 bits of SRC1. {DEST[31:0],SRC1[63:32]} Signed-off-by: Andrei Varvara <[email protected]> Acked-by: Mihai Serb <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - Fix STORE command to support overwriting Shared Descriptor's ↵Andrei Varvara1-1/+17
memory In case Store command is used with overwrite Shared Descriptor feature there is no need for pointer, it is using the address from which the Shared Descriptor was fetched. Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-28crypto: caam - fix SEQ IN PTR command when RTO or PRE bit is setAndrei Varvara2-4/+8
SEQ IN PTR command does not require pointer if RTO or PRE bit is set Updated desc_constr.h accordingly. Signed-off-by: Andrei Varvara <[email protected]> Reviewed-by: Phillips Kim-R1AAHA <[email protected]> Reviewed-by: Fleming Andrew-AFLEMING <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-27Merge tag 'ux500-dma40-for-arm-soc' of ↵Olof Johansson4-5/+62
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers From Linus Walleij: This is a set of patches from Lee Jones to start converting the ux500 to fetch DMA channels from the device tree: - Full DT support and channel mapping in the DMA40 driver - Dropping of platform data for migrated devices on the DT boot path. * tag 'ux500-dma40-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: (36 commits) ARM: ux500: Register Cryp and Hash platform drivers on Snowball crypto: ux500/[cryp|hash] - Show successful start-up in the bootlog ARM: ux500: Stop passing Cryp DMA channel config information though pdata crypto: ux500/cryp - Set DMA configuration though dma_slave_config() crypto: ux500/cryp - Prepare clock before enabling it ARM: ux500: Stop passing Hash DMA channel config information though pdata crypto: ux500/hash - Set DMA configuration though dma_slave_config() crypto: ux500/hash - Prepare clock before enabling it ARM: ux500: Remove unnecessary attributes from DMA channel request pdata dmaengine: ste_dma40: Correct copy/paste error ARM: ux500: Remove DMA address look-up table dmaengine: ste_dma40: Remove redundant address fetching function dmaengine: ste_dma40: Only use addresses passed as configuration information ARM: ux500: Stop passing UART's platform data for Device Tree boots dmaengine: ste_dma40: Don't configure runtime configurable setup during allocate dmaengine: ste_dma40: Remove unnecessary call to d40_phy_cfg() dmaengine: ste_dma40: Separate Logical Global Interrupt Mask (GIM) unmasking ARM: ux500: Pass remnant platform data though to DMA40 driver dmaengine: ste_dma40: Supply full Device Tree parsing support dmaengine: ste_dma40: Allow driver to be probe()able when DT is enabled ... Signed-off-by: Olof Johansson <[email protected]>
2013-05-27crypto: ux500/hash - Enable DT probing of the driverLee Jones1-0/+6
By providing an OF match table with a suitable compatible string, we can ensure the ux500-hasht driver is probed by supplying an associated DT node in a given platform's Device Tree. Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-27crypto: ux500/cryp - Enable DT probing of the driverLee Jones1-0/+6
By providing an OF match table with a suitable compatible string, we can ensure the ux500-crypt driver is probed by supplying an associated DT node in a given platform's Device Tree. Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-24crypto: sahara - remove dependency on EXPERIMENTALPaul Bolle1-1/+1
The Kconfig symbol EXPERIMENTAL was removed in v3.9. So this dependency makes it impossible to set CRYPTO_DEV_SAHARA. It's unlikely that this is what is intended, so let's remove this dependency. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-24crypto: s5p-sss: Remove redundant platform_set_drvdata()Sachin Kamat1-2/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-24crypto: mv_cesa: Remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-24drivers: crypto: use devm_ioremap_resource()Laurent Navet2-8/+6
Replace calls to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_request_and_ioremap.cocci. Signed-off-by: Laurent Navet <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-24drivers/crypto/nx: Fixes for multiple races and issuesKent Yoder6-38/+19
Fixes a race on driver init with registering algorithms where the driver status flag wasn't being set before self testing started. Added the cra_alignmask field for CBC and ECB modes. Fixed a bug in GCM where AES block size was being used instead of authsize. Removed use of blkcipher_walk routines for scatterlist processing. Corner cases in the code prevent us from processing an entire scatterlist at a time and walking the buffers in block sized chunks turns out to be unecessary anyway. Fixed off-by-one error in saving off extra data in the sha code. Fixed accounting error for number of bytes processed in the sha code. Signed-off-by: Kent Yoder <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-05-23crypto: ux500/[cryp|hash] - Show successful start-up in the bootlogLee Jones2-1/+3
The Cryp driver is currently silent and the Hash driver prints the name of its probe function unnecessarily. Let's just put a nice descriptive one-liner there instead. Cc: David S. Miller <[email protected]> Cc: Andreas Westin <[email protected]> Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-23crypto: ux500/cryp - Set DMA configuration though dma_slave_config()Lee Jones2-1/+23
The DMA controller currently takes configuration information from information passed though dma_channel_request(), but it shouldn't. Using the API, the DMA channel should only be configured during a dma_slave_config() call. Cc: David S. Miller <[email protected]> Cc: Andreas Westin <[email protected]> Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-23crypto: ux500/cryp - Prepare clock before enabling itLee Jones1-1/+11
If we fail to prepare the ux500-cryp clock before enabling it the platform will fail to boot. Here we insure this happens. Cc: David S. Miller <[email protected]> Cc: Andreas Westin <[email protected]> Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Acked-by: Ulf Hansson <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-23crypto: ux500/hash - Set DMA configuration though dma_slave_config()Lee Jones2-1/+14
The DMA controller currently takes configuration information from information passed though dma_channel_request(), but it shouldn't. Using the API, the DMA channel should only be configured during a dma_slave_config() call. Cc: David S. Miller <[email protected]> Cc: Andreas Westin <[email protected]> Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-23crypto: ux500/hash - Prepare clock before enabling itLee Jones1-1/+11
If we fail to prepare the ux500-hash clock before enabling it the platform will fail to boot. Here we insure this happens. Cc: David S. Miller <[email protected]> Cc: Andreas Westin <[email protected]> Cc: [email protected] Acked-by: Herbert Xu <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-14crypto: caam - fix inconsistent assoc dma mapping directionHoria Geanta1-2/+2
req->assoc is dma mapped BIDIRECTIONAL and unmapped TO_DEVICE. Since it is read-only for the device, use TO_DEVICE both for mapping and unmapping. Cc: <[email protected]> # 3.9, 3.8 Signed-off-by: Horia Geanta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-14crypto: caam - FIX RNG init for RNG greater than equal to 4Ruchika Gupta2-4/+48
For SEC including a RNG block version >= 4, special initialization must occur before any descriptor that uses RNG block can be submitted. This initialization is required not only for SEC with version greater than 5.0, but for SEC with RNG version >=4. There may be a case where RNG has already been instantiated by u-boot or boot ROM code.In such SoCs, if RNG is initialized again SEC would returns "Instantiation error". Hence, the initialization status of RNG4 should be also checked before doing RNG init. Signed-off-by: Ruchika Gupta <[email protected]> Signed-off-by: Alex Porosanu <[email protected]> Signed-off-by: Andy Fleming <[email protected]> Reviewed-by: Vakul Garg <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-05-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds23-321/+2312
Pull crypto update from Herbert Xu: - XTS mode optimisation for twofish/cast6/camellia/aes on x86 - AVX2/x86_64 implementation for blowfish/twofish/serpent/camellia - SSSE3/AVX/AVX2 optimisations for sha256/sha512 - Added driver for SAHARA2 crypto accelerator - Fix for GMAC when used in non-IPsec secnarios - Added generic CMAC implementation (including IPsec glue) - IP update for crypto/atmel - Support for more than one device in hwrng/timeriomem - Added Broadcom BCM2835 RNG driver - Misc fixes * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (59 commits) crypto: caam - fix job ring cleanup code crypto: camellia - add AVX2/AES-NI/x86_64 assembler implementation of camellia cipher crypto: serpent - add AVX2/x86_64 assembler implementation of serpent cipher crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher crypto: tcrypt - add async cipher speed tests for blowfish crypto: testmgr - extend camellia test-vectors for camellia-aesni/avx2 crypto: aesni_intel - fix Kconfig problem with CRYPTO_GLUE_HELPER_X86 crypto: aesni_intel - add more optimized XTS mode for x86-64 crypto: x86/camellia-aesni-avx - add more optimized XTS code crypto: cast6-avx: use new optimized XTS code crypto: x86/twofish-avx - use optimized XTS code crypto: x86 - add more optimized XTS-mode for serpent-avx xfrm: add rfc4494 AES-CMAC-96 support crypto: add CMAC support to CryptoAPI crypto: testmgr - add empty test vectors for null ciphers crypto: testmgr - add AES GMAC test vectors crypto: gcm - fix rfc4543 to handle async crypto correctly crypto: gcm - make GMAC work when dst and src are different hwrng: timeriomem - added devicetree hooks ...
2013-05-02Merge tag 'multiplatform-for-linus' of ↵Linus Torvalds3-4/+0
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC multiplatform updates from Olof Johansson: "More multiplatform enablement for ARM platforms. The ones converted in this branch are: - bcm2835 - cns3xxx - sirf - nomadik - msx - spear - tegra - ux500 We're getting close to having most of them converted! One of the larger platforms remaining is Samsung Exynos, and there are a bunch of supporting patches in this merge window for it. There was a patch in this branch to a early version of multiplatform conversion, but it ended up being reverted due to need of more bake time. The revert commit is part of the branch since it would have required rebasing multiple dependent branches and they were stable by then" * tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms clocksource: nomadik-mtu: fix up clocksource/timer Revert "ARM: exynos: enable multiplatform support" ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ" ARM: exynos: enable multiplatform support rtc: s3c: make header file local mtd: onenand/samsung: make regs-onenand.h file local thermal/exynos: remove unnecessary header inclusions mmc: sdhci-s3c: remove platform dependencies ARM: samsung: move mfc device definition to s5p-dev-mfc.c ARM: exynos: move debug-macro.S to include/debug/ ARM: exynos: prepare for sparse IRQ ARM: exynos: introduce EXYNOS_ATAGS symbol ARM: tegra: build assembly files with -march=armv7-a ARM: Push selects for TWD/SCU into machine entries ARM: ux500: build hotplug.o for ARMv7-a ARM: ux500: move to multiplatform ARM: ux500: make remaining headers local ARM: ux500: make irqs.h local to platform ARM: ux500: get rid of <mach/[hardware|db8500-regs].h> ...
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small code cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits) mm: Convert print_symbol to %pSR gfs2: Convert print_symbol to %pSR m32r: Convert print_symbol to %pSR iostats.txt: add easy-to-find description for field 6 x86 cmpxchg.h: fix wrong comment treewide: Fix typo in printk and comments doc: devicetree: Fix various typos docbook: fix 8250 naming in device-drivers pata_pdc2027x: Fix compiler warning treewide: Fix typo in printks mei: Fix comments in drivers/misc/mei treewide: Fix typos in kernel messages pm44xx: Fix comment for "CONFIG_CPU_IDLE" doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP" mmzone: correct "pags" to "pages" in comment. kernel-parameters: remove outdated 'noresidual' parameter Remove spurious _H suffixes from ifdef comments sound: Remove stray pluses from Kconfig file radio-shark: Fix printk "CONFIG_LED_CLASS" doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE ...
2013-04-25crypto: caam - fix job ring cleanup codeVakul Garg2-0/+5
The job ring init function creates a platform device for each job ring. While the job ring is shutdown, e.g. while caam module removal, its platform device was not being removed. This leads to failure while reinsertion and then removal of caam module second time. The following kernel crash dump appears when caam module is reinserted and then removed again. This patch fixes it. root@p4080ds:~# rmmod caam.ko Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xf94aca18 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=8 P4080 DS Modules linked in: caam(-) qoriq_dbg(O) [last unloaded: caam] NIP: f94aca18 LR: f94aca18 CTR: c029f950 REGS: eac47d60 TRAP: 0300 Tainted: G O (3.8.4-rt2) MSR: 00029002 <CE,EE,ME> CR: 22022484 XER: 20000000 DEAR: 00000008, ESR: 00000000 TASK = e49dfaf0[2110] 'rmmod' THREAD: eac46000 CPU: 1 GPR00: f94ad3f4 eac47e10 e49dfaf0 00000000 00000005 ea2ac210 ffffffff 00000000 GPR08: c286de68 e4977ce0 c029b1c0 00000001 c029f950 10029738 00000000 100e0000 GPR16: 00000000 10023d00 1000cbdc 1000cb8c 1000cbb8 00000000 c07dfecc 00000000 GPR24: c07e0000 00000000 1000cbd8 f94e0000 ffffffff 00000000 ea53cd40 00000000 NIP [f94aca18] caam_reset_hw_jr+0x18/0x1c0 [caam] LR [f94aca18] caam_reset_hw_jr+0x18/0x1c0 [caam] Call Trace: [eac47e10] [eac47e30] 0xeac47e30 (unreliable) [eac47e20] [f94ad3f4] caam_jr_shutdown+0x34/0x220 [caam] [eac47e60] [f94ac0e4] caam_remove+0x54/0xb0 [caam] [eac47e80] [c029fb38] __device_release_driver+0x68/0x120 [eac47e90] [c02a05c8] driver_detach+0xd8/0xe0 [eac47eb0] [c029f8e0] bus_remove_driver+0xa0/0x110 [eac47ed0] [c00768e4] sys_delete_module+0x144/0x270 [eac47f40] [c000e2f0] ret_from_syscall+0x0/0x3c Signed-off-by: Vakul Garg <[email protected]> Signed-off-by: Bharat Bhushan <[email protected]> Reviewed-by: Horia Geanta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-04-25crypto: caam - static constify error dataKim Phillips1-5/+5
checkstack reports report_deco_status(), report_ccb_status() as particularly excessive stack users. Move their lookup tables off the stack and put them in .rodata. Signed-off-by: Kim Phillips <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-04-25crypto: caam - change key gen functions to return signed intKim Phillips3-4/+4
commit 2af8f4a "crypto: caam - coccicheck fixes" added error return values yet neglected to change the type from unsigned. Signed-off-by: Kim Phillips <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-04-09Merge branch 'mxs/cleanup' into next/multiplatformArnd Bergmann3-54/+4
This is a dependency for mxs/multiplatform Signed-off-by: Arnd Bergmann <[email protected]> Conflicts: drivers/clocksource/Makefile
2013-04-08ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>Linus Walleij3-4/+0
This removes <mach/hardware.h> and <mach/db8500-regs.h> from the Ux500, merging them into the local include "db8500-regs.h" in mach-ux500. There is some impact outside the ux500 machine, but most of it is dealt with in earlier patches. Contains portions of a clean-up patch from Arnd Bergmann. Cc: Samuel Ortiz <[email protected]> Cc: Ulf Hansson <[email protected]> Acked-by: Mike Turquette <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-04-05crypto: ux500 - add missing commaLinus Walleij1-1/+1
Commit 4f31f5b19eb0418a847b989abc9ac22af1991fe2 "PM / crypto / ux500: Use struct dev_pm_ops for power management" add a new line to the driver struct but missed to add a trailing comma, causing build errors when crypto is selected. This adds the missing comma. This was not noticed until now because the crypto block is not in the ux500 defconfig. A separate patch will be submitted to fix this. Cc: <[email protected]> # 3.8.x Cc: Rafael J. Wysocki <[email protected]> Cc: Magnus Myrstedt <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-04-03crypto: ux500 - fix error return code in hash_dma_final()Wei Yongjun1-0/+2
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-22crypto: picoxcell - Use of_match_ptr() macroSachin Kamat1-3/+1
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Jamie Iles <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-22crypto: caam - Fix missing init of '.type' in AEAD algos.Vakul Garg1-0/+6
Following AEAD algo templates are updated for '.type' initialization. (a) authenc(hmac(sha224),cbc(aes)) (b) authenc(hmac(sha384),cbc(aes)) (c) authenc(hmac(sha224),cbc(des3_ede)) (d) authenc(hmac(sha384),cbc(des3_ede)) (e) authenc(hmac(sha224),cbc(des)) (f) authenc(hmac(sha384),cbc(des)) Signed-off-by: Vakul Garg <[email protected]> Reviewed-by: Kim Phillips <[email protected]> Signed-off-by: Andy Fleming <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-22crypto: caam - set RDB bit in security configuration registerVakul Garg2-1/+6
This change is required for post SEC-5.0 devices which have RNG4. Setting RDB in security configuration register allows CAAM to use the "Random Data Buffer" to be filled by a single request. The Random Data Buffer is large enough for ten packets to get their IVs from a single request. If the Random Data Buffer is not enabled, then each IV causes a separate request, and RNG4 hardware cannot keep up resulting in lower IPSEC throughput if random IVs are used. Signed-off-by: Vakul Garg <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-21crypto: ux500 - replace kmalloc and then memcpy with kmemdupMihnea Dobrescu-Balaur1-3/+1
Signed-off-by: Mihnea Dobrescu-Balaur <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-21crypto: sahara - Add driver for SAHARA2 accelerator.Javier Martin3-0/+1081
SAHARA2 HW module is included in the i.MX27 SoC from Freescale. It is capable of performing cipher algorithms such as AES, 3DES..., hashing and RNG too. This driver provides support for AES-CBC and AES-ECB by now. Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Javier Martin <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-21Revert "crypto: caam - add IPsec ESN support"Horia Geanta2-26/+2
This reverts commit 891104ed008e8646c7860fe5bc70b0aac55dcc6c. Current IPsec ESN implementation for authencesn(cbc(aes), hmac(sha)) (separate encryption and integrity algorithms) does not conform to RFC4303. ICV is generated by hashing the sequence SPI, SeqNum-High, SeqNum-Low, IV, Payload instead of SPI, SeqNum-Low, IV, Payload, SeqNum-High. Cc: <[email protected]> # 3.8, 3.7 Reported-by: Chaoxing Lin <[email protected]> Signed-off-by: Horia Geanta <[email protected]> Reviewed-by: Kim Phillips <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-21Revert "crypto: talitos - add IPsec ESN support"Horia Geanta1-28/+2
This reverts commit e763eb699be723fb41af818118068c6b3afdaf8d. Current IPsec ESN implementation for authencesn(cbc(aes), hmac(sha)) (separate encryption and integrity algorithms) does not conform to RFC4303. ICV is generated by hashing the sequence SPI, SeqNum-High, SeqNum-Low, IV, Payload instead of SPI, SeqNum-Low, IV, Payload, SeqNum-High. Cc: <[email protected]> # 3.8, 3.7 Reported-by: Chaoxing Lin <[email protected]> Signed-off-by: Horia Geanta <[email protected]> Reviewed-by: Kim Phillips <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-18treewide: Fix typos in printk and commentMasanari Iida1-1/+1
Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-03-10crypto: caam - fix typo "CRYPTO_AHASH"Paul Bolle1-1/+1
The Kconfig entry for CAAM's hash algorithm implementations has always selected CRYPTO_AHASH. But there's no corresponding Kconfig symbol. It seems it was intended to select CRYPTO_HASH, like other crypto drivers do. That would apparently (indirectly) select CRYPTO_HASH2, which would enable the ahash functionality this driver uses. Signed-off-by: Paul Bolle <[email protected]> Reviewed-by: Kim Phillips <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: omap-sham - Use module_platform_driver macroSachin Kamat1-12/+1
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: omap-aes - Use module_platform_driver macroSachin Kamat1-12/+1
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: omap-aes - Use pm_runtime_put instead of pm_runtime_put_sync in taskletJoel A Fernandes1-1/+1
After DMA is complete, the omap_aes_finish_req function is called as a part of the done_task tasklet. During this its atomic and any calls to pm functions should not assume they wont sleep. The patch replaces a call to pm_runtime_put_sync (which can sleep) with pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during AES operation. Tested on an AM33xx SoC device (beaglebone board). To reproduce the problem, I used the tcrypt kernel module as: modprobe tcrypt sec=2 mode=500 Signed-off-by: Joel A Fernandes <[email protected]> Cc: David S. Miller <[email protected]> Acked-by: Mark A. Greer <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: omap-sham - Use pm_runtime_put instead of pm_runtime_put_sync in taskletJoel A Fernandes1-1/+1
After DMA is complete, the omap_sham_finish_req function is called as a part of the done_task tasklet. During this its atomic and any calls to pm functions should not assume they wont sleep. The patch replaces a call to pm_runtime_put_sync (which can sleep) with pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during SHA operation. Tested on an AM33xx SoC device (beaglebone board). To reproduce the problem, used the tcrypt kernel module as: modprobe tcrypt sec=2 mode=403 Signed-off-by: Joel A Fernandes <[email protected]> Cc: David S. Miller <[email protected]> Acked-by: Mark A. Greer <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: bfin_crc - Fix possible NULL pointer dereferenceSyam Sidhardhan1-3/+3
If we define dev_dbg(), then there is a possible NULL pointer dereference. Signed-off-by: Syam Sidhardhan <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2013-03-10crypto: atmel-sha - add support for latest release of the IP (0x410)Nicolas Royer3-104/+497
Updates from IP release 0x320 to 0x400: - add DMA support (previous IP revision use PDC) - add DMA double input buffer support - add SHA224 support Update from IP release 0x400 to 0x410: - add SHA384 and SHA512 support Signed-off-by: Nicolas Royer <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Acked-by: Eric Bénard <[email protected]> Tested-by: Eric Bénard <[email protected]> Signed-off-by: Herbert Xu <[email protected]>