15 Feb, 2017
2 commits
-
commit e5da5c5667381d2772374ee6a2967b3576c9483d upstream.
Eliminate a double-add by creating a new list to manage
command descriptors when created; move the descriptor to
the pending list when the command is submitted.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
Signed-off-by: Greg Kroah-Hartman -
commit 500c0106e638e08c2c661c305ed57d6b67e10908 upstream.
An I/O page fault occurs when the IOMMU is enabled on a
system that supports the v5 CCP. DMA operations use a
Request ID value that does not match what is expected by
the IOMMU, resulting in the I/O page fault. Setting the
Request ID value to 0 corrects this issue.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
Signed-off-by: Greg Kroah-Hartman
02 Oct, 2016
2 commits
-
Add human-readable strings to log messages about CCP errors
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Change names of data structure instances. Add const
keyword where appropriate. Add error handling path.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
22 Sep, 2016
2 commits
-
Fix the retrn value check which testing the wrong variable
in ccp_dmaengine_register().Fixes: 58ea8abf4904 ("crypto: ccp - Register the CCP as a DMA resource")
Signed-off-by: Wei Yongjun
Acked-by: Gary R Hook
Signed-off-by: Herbert Xu -
Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().
Signed-off-by: Wei Yongjun
Acked-by: Gary R Hook
Signed-off-by: Herbert Xu
07 Sep, 2016
1 commit
-
ccp_dmaengine_register used to return with an error code before
releasing all resource. This patch adds a jump to the appropriate label
ensuring that the resources are properly released before returning.This issue was found with Hector.
Signed-off-by: Quentin Lambert
Signed-off-by: Herbert Xu
16 Aug, 2016
1 commit
-
Fixes the following sparse warning:
drivers/crypto/ccp/ccp-dev.c:62:14: warning:
symbol 'ccp_increment_unit_ordinal' was not declared. Should it be static?Signed-off-by: Wei Yongjun
Signed-off-by: Herbert Xu
09 Aug, 2016
11 commits
-
A second CCP is available, identical to the first, with
its ownn PCI ID. Make it available for use by the crypto
subsystem, as well as for DMA activity and random
number generation.This device is not pre-configured at at boot time. The
driver must configure it (during the probe) for use.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Every CCP is capable of providing general DMA services.
Register the device as a provider.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Enable equivalent function on a v5 CCP. Add support for a
version 5 CCP which enables AES/XTS/SHA services. Also,
more work on the data structures to virtualize
functionality.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Available queue space is used to decide (by counting free slots)
if we have to put a command on hold or if it can be sent
to the engine immediately.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Make the RNG support code common (where possible) in
preparation for adding a v5 device.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Move the KSB access/management functions to the v3
device file, and add function pointers to the actions
structure. At the operations layer all of the references
to the storage block will be generic (virtual). This is
in preparation for a version 5 device, in which the
private storage block is managed differently.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Form and use of the local storage block in the CCP is
particular to the device version. Much of the code that
accesses the storage block can treat it as a virtual
resource, and will under go some renaming. Device-specific
access to the memory will be moved into device file.
Service functions will be added to the actions
structure.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Use more concise field names; "perform_" is too verbose.
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Device-specific values for the BAR and offset should be found
in the version data structure.Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu -
Adhere to the cryptodev comment convention.
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
01 Jul, 2016
1 commit
-
This patch replaces use of the obsolete ablkcipher with skcipher.
Signed-off-by: Herbert Xu
25 May, 2016
1 commit
-
The ccp-crypto module for AES XTS support has a bug that can allow requests
greater than 4096 bytes in size to be passed to the CCP hardware. The CCP
hardware does not support request sizes larger than 4096, resulting in
incorrect output. The request should actually be handled by the fallback
mechanism instantiated by the ccp-crypto module.Add a check to insure the request size is less than or equal to the maximum
supported size and use the fallback mechanism if it is not.Cc: # 3.14.x-
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
03 May, 2016
1 commit
-
The ccp_actions structure is never modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Acked-by: Gary Hook
Signed-off-by: Herbert Xu
28 Apr, 2016
1 commit
-
Merge the crypto tree to pull in the qat adf_init_pf_wq change.
25 Apr, 2016
1 commit
-
A DMA_ENGINE requires DMADEVICES in Kconfig
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
20 Apr, 2016
1 commit
-
The CCP has the ability to provide DMA services to the
kernel using pass-through mode of the device. Register
these services as general purpose DMA channels.Changes since v2:
- Add a Signed-off-byChanges since v1:
- Allocate memory for a string in ccp_dmaengine_register
- Ensure register/unregister calls are properly ordered
- Verified all changed files are listed in the diffstat
- Undo some superfluous changes
- Added a cc:Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
15 Apr, 2016
2 commits
-
Direct include of rwlock_types.h breaks RT, use spinlock_types.h instead.
Fixes: 553d2374db0b crypto: ccp - Support for multiple CCPs
Signed-off-by: Mike Galbraith
Signed-off-by: Herbert Xu -
Prevent information from leaking to userspace by doing a memset to 0 of
the export state structure before setting the structure values and copying
it. This prevents un-initialized padding areas from being copied into the
export area.Cc: # 3.14.x-
Reported-by: Ben Hutchings
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
17 Mar, 2016
1 commit
-
This patch simplifies an unneeded read-write lock.
Signed-off-by: Gary R Hook
Signed-off-by: Herbert Xu
11 Mar, 2016
4 commits
-
Support for different generations of the coprocessor
requires that an abstraction layer be implemented for
interacting with the hardware. This patch splits out
version-specific functions to a separate file and populates
the version structure (acting as a driver) with function
pointers.Signed-off-by: Gary R Hook
Acked-by: Tom Lendacky
Signed-off-by: Herbert Xu -
Future hardware may introduce new algorithms wherein the
driver will need to manage resources for different versions
of the cryptographic coprocessor. This precursor patch
determines the version of the available device, and marks
and registers algorithms accordingly. A structure is added
which manages the version-specific data.Signed-off-by: Gary R Hook
Acked-by: Tom Lendacky
Signed-off-by: Herbert Xu -
Enable management of >1 CCPs in a system. Each device will
get a unique identifier, as well as uniquely named
resources. Treat each CCP as an orthogonal unit and register
resources individually.Signed-off-by: Gary R Hook
Acked-by: Tom Lendacky
Signed-off-by: Herbert Xu -
Each x86 SoC will make use of a unique PCI ID for the CCP
device so it is not necessary to check for the CPU family
and model.Signed-off-by: Gary R Hook
Acked-by: Tom Lendacky
Signed-off-by: Herbert Xu
28 Feb, 2016
1 commit
-
Since a crypto_ahash_import() can be called against a request context
that has not had a crypto_ahash_init() performed, the request context
needs to be cleared to insure there is no random data present. If not,
the random data can result in a kernel oops during crypto_ahash_update().Cc: # 3.14.x-
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
06 Feb, 2016
1 commit
-
Use a local variable for the exported and imported state so that
alignment is not an issue. On export, set a local variable from the
request context and then memcpy the contents of the local variable to
the export memory area. On import, memcpy the import memory area into
a local variable and then use the local variable to set the request
context.Cc: # 3.14.x-
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
01 Feb, 2016
1 commit
-
Since the exported information can be exposed to user-space, instead of
exporting the entire request context only export the minimum information
needed.Cc: # 3.14.x-
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
25 Jan, 2016
1 commit
-
Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
added a check to prevent ahash algorithms from successfully registering
if the import and export functions were not implemented. This prevents
an oops in the hash_accept function of algif_hash. This commit causes
the ccp-crypto module SHA support and AES CMAC support from successfully
registering and causing the ccp-crypto module load to fail because the
ahash import and export functions are not implemented.Update the CCP Crypto API support to provide import and export support
for ahash algorithms.Cc: # 3.14.x-
Signed-off-by: Tom Lendacky
Signed-off-by: Herbert Xu
25 Dec, 2015
1 commit
-
Use to_pci_dev() and to_platform_device() instead of open-coding.
Signed-off-by: Geliang Tang
Signed-off-by: Herbert Xu
22 Dec, 2015
1 commit
-
Precalculated hash for empty message are now present in hash headers.
This patch just use them.Signed-off-by: LABBE Corentin
Tested-by: Tom Lendacky
Acked-by: Tom Lendacky
Signed-off-by: Herbert Xu
07 Nov, 2015
2 commits
-
* acpi-pci:
PCI: ACPI: Add support for PCI device DMA coherency
PCI: OF: Move of_pci_dma_configure() to pci_dma_configure()
of/pci: Fix pci_get_host_bridge_device leak
device property: ACPI: Remove unused DMA APIs
device property: ACPI: Make use of the new DMA Attribute APIs
device property: Adding DMA Attribute APIs for Generic Devices
ACPI: Adding DMA Attribute APIs for ACPI Device
device property: Introducing enum dev_dma_attr
ACPI: Honor ACPI _CCA attribute settingConflicts:
drivers/crypto/ccp/ccp-platform.c -
Now that we have the new DMA attribute APIs, we can replace the older
acpi_check_dma() and device_dma_is_coherent().Signed-off-by: Suravee Suthikulpanit
Acked-by: Bjorn Helgaas
Reviewed-by: Hanjun Guo
Signed-off-by: Rafael J. Wysocki