1. 12 2月, 2015 1 次提交
  2. 11 2月, 2015 1 次提交
  3. 04 2月, 2015 1 次提交
    • A
      crypto: switch af_alg_make_sg() to iov_iter · 1d10eb2f
      Al Viro 提交于
      With that, all ->sendmsg() instances are converted to iov_iter primitives
      and are agnostic wrt the kind of iov_iter they are working with.
      So's the last remaining ->recvmsg() instance that wasn't kind-agnostic yet.
      All ->sendmsg() and ->recvmsg() advance ->msg_iter by the amount actually
      copied and none of them modifies the underlying iovec, etc.
      
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1d10eb2f
  4. 22 12月, 2014 1 次提交
    • R
      crypto: af_alg - fix backlog handling · 7e77bdeb
      Rabin Vincent 提交于
      If a request is backlogged, it's complete() handler will get called
      twice: once with -EINPROGRESS, and once with the final error code.
      
      af_alg's complete handler, unlike other users, does not handle the
      -EINPROGRESS but instead always completes the completion that recvmsg()
      is waiting on.  This can lead to a return to user space while the
      request is still pending in the driver.  If userspace closes the sockets
      before the requests are handled by the driver, this will lead to
      use-after-frees (and potential crashes) in the kernel due to the tfm
      having been freed.
      
      The crashes can be easily reproduced (for example) by reducing the max
      queue length in cryptod.c and running the following (from
      http://www.chronox.de/libkcapi.html) on AES-NI capable hardware:
      
       $ while true; do kcapi -x 1 -e -c '__ecb-aes-aesni' \
          -k 00000000000000000000000000000000 \
          -p 00000000000000000000000000000000 >/dev/null & done
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NRabin Vincent <rabin.vincent@axis.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7e77bdeb
  5. 11 12月, 2014 1 次提交
  6. 05 12月, 2014 1 次提交
  7. 31 7月, 2014 1 次提交
  8. 15 11月, 2013 1 次提交
  9. 27 7月, 2011 1 次提交
  10. 21 12月, 2010 1 次提交
  11. 08 12月, 2010 1 次提交
  12. 19 11月, 2010 1 次提交
    • H
      crypto: af_alg - User-space interface for Crypto API · 03c8efc1
      Herbert Xu 提交于
      This patch creates the backbone of the user-space interface for
      the Crypto API, through a new socket family AF_ALG.
      
      Each session corresponds to one or more connections obtained from
      that socket.  The number depends on the number of inputs/outputs
      of that particular type of operation.  For most types there will
      be a s ingle connection/file descriptor that is used for both input
      and output.  AEAD is one of the few that require two inputs.
      
      Each algorithm type will provide its own implementation that plugs
      into af_alg.  They're keyed using a string such as "skcipher" or
      "hash".
      
      IOW this patch only contains the boring bits that is required
      to hold everything together.
      
      Thakns to Miloslav Trmac for reviewing this and contributing
      fixes and improvements.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NMartin Willi <martin@strongswan.org>
      03c8efc1