1. 07 2月, 2007 7 次提交
  2. 14 12月, 2006 1 次提交
  3. 12 12月, 2006 1 次提交
  4. 07 12月, 2006 8 次提交
  5. 22 11月, 2006 1 次提交
    • D
      WorkStruct: Pass the work_struct pointer instead of context data · 65f27f38
      David Howells 提交于
      Pass the work_struct pointer to the work function rather than context data.
      The work function can use container_of() to work out the data.
      
      For the cases where the container of the work_struct may go away the moment the
      pending bit is cleared, it is made possible to defer the release of the
      structure by deferring the clearing of the pending bit.
      
      To make this work, an extra flag is introduced into the management side of the
      work_struct.  This governs auto-release of the structure upon execution.
      
      Ordinarily, the work queue executor would release the work_struct for further
      scheduling or deallocation by clearing the pending bit prior to jumping to the
      work function.  This means that, unless the driver makes some guarantee itself
      that the work_struct won't go away, the work function may not access anything
      else in the work_struct or its container lest they be deallocated..  This is a
      problem if the auxiliary data is taken away (as done by the last patch).
      
      However, if the pending bit is *not* cleared before jumping to the work
      function, then the work function *may* access the work_struct and its container
      with no problems.  But then the work function must itself release the
      work_struct by calling work_release().
      
      In most cases, automatic release is fine, so this is the default.  Special
      initiators exist for the non-auto-release case (ending in _NAR).
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      65f27f38
  6. 16 10月, 2006 1 次提交
  7. 11 10月, 2006 2 次提交
  8. 24 9月, 2006 2 次提交
  9. 21 9月, 2006 17 次提交
    • H
      [CRYPTO] users: Use crypto_comp and crypto_has_* · e4d5b79c
      Herbert Xu 提交于
      This patch converts all users to use the new crypto_comp type and the
      crypto_has_* functions.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e4d5b79c
    • H
      [CRYPTO] api: Add crypto_comp and crypto_has_* · fce32d70
      Herbert Xu 提交于
      This patch adds the crypto_comp type to complete the compile-time checking
      conversion.  The functions crypto_has_alg and crypto_has_cipher, etc. are
      also added to replace crypto_alg_available.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      fce32d70
    • H
      [CRYPTO] digest: Remove old HMAC implementation · 8425165d
      Herbert Xu 提交于
      This patch removes the old HMAC implementation now that nobody uses it
      anymore.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8425165d
    • H
      [CRYPTO] tcrypt: Use HMAC template and hash interface · e9d41164
      Herbert Xu 提交于
      This patch converts tcrypt to use the new HMAC template rather than the
      hard-coded version of HMAC.  It also converts all digest users to use
      the new cipher interface.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9d41164
    • H
      [CRYPTO] hmac: Add crypto template implementation · 0796ae06
      Herbert Xu 提交于
      This patch rewrites HMAC as a crypto template.  This means that HMAC is no
      longer a hard-coded part of the API.  It's now a template that generates
      standard digest algorithms like any other.
      
      The old HMAC is preserved until all current users are converted.
      
      The same structure can be used by other MACs such as AES-XCBC-MAC.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0796ae06
    • H
      [CRYPTO] digest: Added user API for new hash type · 055bcee3
      Herbert Xu 提交于
      The existing digest user interface is inadequate for support asynchronous
      operations.  For one it doesn't return a value to indicate success or
      failure, nor does it take a per-operation descriptor which is essential
      for the issuing of requests while other requests are still outstanding.
      
      This patch is the first in a series of steps to remodel the interface
      for asynchronous operations.
      
      For the ease of transition the new interface will be known as "hash"
      while the old one will remain as "digest".
      
      This patch also changes sg_next to allow chaining.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      055bcee3
    • H
      [CRYPTO] api: Mark parts of cipher interface as deprecated · 7226bc87
      Herbert Xu 提交于
      Mark the parts of the cipher interface that have been replaced by
      block ciphers as deprecated.  Thanks to Andrew Morton for suggesting
      doing this before removing them completely.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7226bc87
    • H
      [CRYPTO] tcrypt: Use block ciphers where applicable · cba83564
      Herbert Xu 提交于
      This patch converts tcrypt to use the new block cipher type where
      applicable.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      cba83564
    • H
      [CRYPTO] s390: Added block cipher versions of CBC/ECB · a9e62fad
      Herbert Xu 提交于
      This patch adds block cipher algorithms for S390.  Once all users of the
      old cipher type have been converted the existing CBC/ECB non-block cipher
      operations will be removed.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a9e62fad
    • H
      [CRYPTO] cipher: Added block ciphers for CBC/ECB · db131ef9
      Herbert Xu 提交于
      This patch adds two block cipher algorithms, CBC and ECB.  These
      are implemented as templates on top of existing single-block cipher
      algorithms.  They invoke the single-block cipher through the new
      encrypt_one/decrypt_one interface.
      
      This also optimises the in-place encryption and decryption to remove
      the cost of an IV copy each round.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      db131ef9
    • H
      [CRYPTO] cipher: Added block cipher type · 5cde0af2
      Herbert Xu 提交于
      This patch adds the new type of block ciphers.  Unlike current cipher
      algorithms which operate on a single block at a time, block ciphers
      operate on an arbitrarily long linear area of data.  As it is block-based,
      it will skip any data remaining at the end which cannot form a block.
      
      The block cipher has one major difference when compared to the existing
      block cipher implementation.  The sg walking is now performed by the
      algorithm rather than the cipher mid-layer.  This is needed for drivers
      that directly support sg lists.  It also improves performance for all
      algorithms as it reduces the total number of indirect calls by one.
      
      In future the existing cipher algorithm will be converted to only have
      a single-block interface.  This will be done after all existing users
      have switched over to the new block cipher type.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5cde0af2
    • H
      [CRYPTO] scatterwalk: Prepare for block ciphers · 5c64097a
      Herbert Xu 提交于
      This patch prepares the scatterwalk code for use by the new block cipher
      type.
      
      Firstly it halves the size of scatter_walk on 32-bit platforms.  This
      is important as we allocate at least two of these objects on the stack
      for each block cipher operation.
      
      It also exports the symbols since the block cipher code can be built as
      a module.
      
      Finally there is a hack in scatterwalk_unmap that relies on progress
      being made.  Unfortunately, for hardware crypto we can't guarantee
      progress to be made since the hardware can fail.
      
      So this also gets rid of the hack by not advancing the address returned
      by scatterwalk_map.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5c64097a
    • H
      [CRYPTO] cipher: Added encrypt_one/decrypt_one · f28776a3
      Herbert Xu 提交于
      This patch adds two new operations for the simple cipher that encrypts or
      decrypts a single block at a time.  This will be the main interface after
      the existing block operations have moved over to the new block ciphers.
      
      It also adds the crypto_cipher type which is currently only used on the
      new operations but will be extended to setkey as well once existing users
      have been converted to use block ciphers where applicable.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      f28776a3
    • H
      [CRYPTO] api: Added crypto_type support · e853c3cf
      Herbert Xu 提交于
      This patch adds the crypto_type structure which will be used for all new
      crypto algorithm types, beginning with block ciphers.
      
      The primary purpose of this abstraction is to allow different crypto_type
      objects for crypto algorithms of the same type, in particular, there will
      be a different crypto_type objects for asynchronous algorithms.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e853c3cf
    • H
      [CRYPTO] api: Feed flag directly to crypto_yield · 8f21cf0d
      Herbert Xu 提交于
      The sleeping flag used to determine whether crypto_yield can actually
      yield is really a per-operation flag rather than a per-tfm flag.  This
      patch changes crypto_yield to take a flag directly so that we can start
      using a per-operation flag instead the tfm flag.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8f21cf0d
    • H
      [CRYPTO] api: Added crypto_alloc_base · 6d7d684d
      Herbert Xu 提交于
      Up until now all crypto transforms have been of the same type, struct
      crypto_tfm, regardless of whether they are ciphers, digests, or other
      types.  As a result of that, we check the types at run-time before
      each crypto operation.
      
      This is rather cumbersome.  We could instead use different C types for
      each crypto type to ensure that the correct types are used at compile
      time.  That is, we would have crypto_cipher/crypto_digest instead of
      just crypto_tfm.  The appropriate type would then be required for the
      actual operations such as crypto_digest_digest.
      
      Now that we have the type/mask fields when looking up algorithms, it
      is easy to request for an algorithm of the precise type that the user
      wants.  However, crypto_alloc_tfm currently does not expose these new
      attributes.
      
      This patch introduces the function crypto_alloc_base which will carry
      these new parameters.  It will be renamed to crypto_alloc_tfm once
      all existing users have been converted.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      6d7d684d
    • H
      [CRYPTO] api: Added asynchronous flag · f3f632d6
      Herbert Xu 提交于
      This patch adds the asynchronous flag and changes all existing users to
      only look up algorithms that are synchronous.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      f3f632d6