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

    Gary R Hook
     
  • 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

    Gary R Hook
     

02 Oct, 2016

2 commits


22 Sep, 2016

2 commits


07 Sep, 2016

1 commit


16 Aug, 2016

1 commit


09 Aug, 2016

11 commits


01 Jul, 2016

1 commit


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

    Tom Lendacky
     

03 May, 2016

1 commit


28 Apr, 2016

1 commit


25 Apr, 2016

1 commit


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-by

    Changes 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

    Gary R Hook
     

15 Apr, 2016

2 commits


17 Mar, 2016

1 commit


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

    Gary R Hook
     
  • 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

    Gary R Hook
     
  • 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

    Gary R Hook
     
  • 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

    Gary R Hook
     

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

    Tom Lendacky
     

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

    Tom Lendacky
     

01 Feb, 2016

1 commit


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

    Tom Lendacky
     

25 Dec, 2015

1 commit


22 Dec, 2015

1 commit


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 setting

    Conflicts:
    drivers/crypto/ccp/ccp-platform.c

    Rafael J. Wysocki
     
  • 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

    Suthikulpanit, Suravee