1. 17 6月, 2015 2 次提交
  2. 16 6月, 2015 4 次提交
  3. 15 6月, 2015 2 次提交
    • D
      crypto: nx - replace NX842_MEM_COMPRESS with function · 2c6f6eab
      Dan Streetman 提交于
      Replace the NX842_MEM_COMPRESS define with a function that returns the
      specific platform driver's required working memory size.
      
      The common nx-842.c driver refuses to load if there is no platform
      driver present, so instead of defining an approximate working memory
      size that's the maximum approximate size of both platform driver's
      size requirements, the platform driver can directly provide its
      specific, i.e. sizeof(struct nx842_workmem), size requirements which
      the 842-nx crypto compression driver will use.
      
      This saves memory by both reducing the required size of each driver
      to the specific sizeof() amount, as well as using the specific loaded
      platform driver's required amount, instead of the maximum of both.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      2c6f6eab
    • D
      crypto: nx - move include/linux/nx842.h into drivers/crypto/nx/nx-842.h · 32be6d3e
      Dan Streetman 提交于
      Move the contents of the include/linux/nx842.h header file into the
      drivers/crypto/nx/nx-842.h header file.  Remove the nx842.h header
      file and its entry in the MAINTAINERS file.
      
      The include/linux/nx842.h header originally was there because the
      crypto/842.c driver needed it to communicate with the nx-842 hw
      driver.  However, that crypto compression driver was moved into
      the drivers/crypto/nx/ directory, and now can directly include the
      nx-842.h header.  Nothing else needs the public include/linux/nx842.h
      header file, as all use of the nx-842 hardware driver will be through
      the "842-nx" crypto compression driver, since the direct nx-842 api is
      very limited in the buffer alignments and sizes that it will accept,
      and the crypto compression interface handles those limitations and
      allows any alignment and size buffers.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      32be6d3e
  4. 12 6月, 2015 3 次提交
  5. 10 6月, 2015 2 次提交
    • H
      random: Remove kernel blocking API · c2719503
      Herbert Xu 提交于
      This patch removes the kernel blocking API as it has been completely
      replaced by the callback API.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c2719503
    • H
      random: Add callback API for random pool readiness · 205a525c
      Herbert Xu 提交于
      The get_blocking_random_bytes API is broken because the wait can
      be arbitrarily long (potentially forever) so there is no safe way
      of calling it from within the kernel.
      
      This patch replaces it with a callback API instead.  The callback
      is invoked potentially from interrupt context so the user needs
      to schedule their own work thread if necessary.
      
      In addition to adding callbacks, they can also be removed as
      otherwise this opens up a way for user-space to allocate kernel
      memory with no bound (by opening algif_rng descriptors and then
      closing them).
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      205a525c
  6. 09 6月, 2015 3 次提交
  7. 04 6月, 2015 1 次提交
    • D
      crypto: nx - fix nx-842 pSeries driver minimum buffer size · 3154de71
      Dan Streetman 提交于
      Reduce the nx-842 pSeries driver minimum buffer size from 128 to 8.
      Also replace the single use of IO_BUFFER_ALIGN macro with the standard
      and correct DDE_BUFFER_ALIGN.
      
      The hw sometimes rejects buffers that contain padding past the end of the
      8-byte aligned section where it sees the "end" marker.  With the minimum
      buffer size set too high, some highly compressed buffers were being padded
      and the hw was incorrectly rejecting them; this sets the minimum correctly
      so there will be no incorrect padding.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3154de71
  8. 03 6月, 2015 2 次提交
    • T
      crypto: ccp - Protect against poorly marked end of sg list · fb43f694
      Tom Lendacky 提交于
      Scatter gather lists can be created with more available entries than are
      actually used (e.g. using sg_init_table() to reserve a specific number
      of sg entries, but in actuality using something less than that based on
      the data length).  The caller sometimes fails to mark the last entry
      with sg_mark_end().  In these cases, sg_nents() will return the original
      size of the sg list as opposed to the actual number of sg entries that
      contain valid data.
      
      On arm64, if the sg_nents() value is used in a call to dma_map_sg() in
      this situation, then it causes a BUG_ON in lib/swiotlb.c because an
      "empty" sg list entry results in dma_capable() returning false and
      swiotlb trying to create a bounce buffer of size 0. This occurred in
      the userspace crypto interface before being fixed by
      
      0f477b65 ("crypto: algif - Mark sgl end at the end of data")
      
      Protect against this by using the new sg_nents_for_len() function which
      returns only the number of sg entries required to meet the desired
      length and supplying that value to dma_map_sg().
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      fb43f694
    • D
      crypto: nx - prevent nx 842 load if no hw driver · 3e648cbe
      Dan Streetman 提交于
      Change the nx-842 common driver to wait for loading of both platform
      drivers, and fail loading if the platform driver pointer is not set.
      Add an independent platform driver pointer, that the platform drivers
      set if they find they are able to load (i.e. if they find their platform
      devicetree node(s)).
      
      The problem is currently, the main nx-842 driver will stay loaded even
      if there is no platform driver and thus no possible way it can do any
      compression or decompression.  This allows the crypto 842-nx driver
      to load even if it won't actually work.  For crypto compression users
      (e.g. zswap) that expect an available crypto compression driver to
      actually work, this is bad.  This patch fixes that, so the 842-nx crypto
      compression driver won't load if it doesn't have the driver and hardware
      available to perform the compression.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3e648cbe
  9. 27 5月, 2015 4 次提交
  10. 25 5月, 2015 1 次提交
  11. 22 5月, 2015 3 次提交
  12. 18 5月, 2015 3 次提交
  13. 15 5月, 2015 4 次提交
  14. 13 5月, 2015 6 次提交