14 Mar, 2008

1 commit


08 Mar, 2008

1 commit


06 Mar, 2008

2 commits

  • When using aes-xcbc-mac for authentication in IPsec,
    the kernel crashes. It seems this algorithm doesn't
    account for the space IPsec may make in scatterlist for authtag.
    Thus when crypto_xcbc_digest_update2() gets called,
    nbytes may be less than sg[i].length.
    Since nbytes is an unsigned number, it wraps
    at the end of the loop allowing us to go back
    into loop and causing crash in memcpy.

    I used update function in digest.c to model this fix.
    Please let me know if it looks ok.

    Signed-off-by: Joy Latten
    Signed-off-by: Herbert Xu

    Joy Latten
     
  • The XTS blockmode uses a copy of the IV which is saved on the stack
    and may or may not be properly aligned. If it is not, it will break
    hardware cipher like the geode or padlock.
    This patch encrypts the IV in place so we don't have to worry about
    alignment.

    Signed-off-by: Sebastian Siewior
    Tested-by: Stefan Hellermann
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     

05 Mar, 2008

1 commit


23 Feb, 2008

2 commits


18 Feb, 2008

1 commit

  • This patch fixes the following build error caused by commit
    3631c650c495d61b1dabf32eb26b46873636e918:

    ...
    LD .tmp_vmlinux1
    crypto/built-in.o: In function `skcipher_null_crypt':
    crypto_null.c:(.text+0x3d14): undefined reference to `blkcipher_walk_virt'
    crypto_null.c:(.text+0x3d14): relocation truncated to fit: R_MIPS_26 against `blkcipher_walk_virt'
    crypto/built-in.o: In function `$L32':
    crypto_null.c:(.text+0x3d54): undefined reference to `blkcipher_walk_done'
    crypto_null.c:(.text+0x3d54): relocation truncated to fit: R_MIPS_26 against `blkcipher_walk_done'
    crypto/built-in.o:(.data+0x2e8): undefined reference to `crypto_blkcipher_type'
    make[1]: *** [.tmp_vmlinux1] Error 1

    Signed-off-by: Adrian Bunk
    Signed-off-by: Herbert Xu

    Adrian Bunk
     

15 Feb, 2008

1 commit


08 Feb, 2008

1 commit


07 Feb, 2008

6 commits

  • The source and destination addresses are included to allow channel
    selection based on address alignment.

    Signed-off-by: Dan Williams
    Reviewed-by: Haavard Skinnemoen

    Dan Williams
     
  • Pass a full set of flags to drivers' per-operation 'prep' routines.
    Currently the only flag passed is DMA_PREP_INTERRUPT. The expectation is
    that arch-specific async_tx_find_channel() implementations can exploit this
    capability to find the best channel for an operation.

    Signed-off-by: Dan Williams
    Acked-by: Shannon Nelson
    Reviewed-by: Haavard Skinnemoen

    Dan Williams
     
  • The tx_set_src and tx_set_dest methods were originally implemented to allow
    an array of addresses to be passed down from async_xor to the dmaengine
    driver while minimizing stack overhead. Removing these methods allows
    drivers to have all transaction parameters available at 'prep' time, saves
    two function pointers in struct dma_async_tx_descriptor, and reduces the
    number of indirect branches..

    A consequence of moving this data to the 'prep' routine is that
    multi-source routines like async_xor need temporary storage to convert an
    array of linear addresses into an array of dma addresses. In order to keep
    the same stack footprint of the previous implementation the input array is
    reused as storage for the dma addresses. This requires that
    sizeof(dma_addr_t) be less than or equal to sizeof(void *). As a
    consequence CONFIG_DMADEVICES now depends on !CONFIG_HIGHMEM64G. It also
    requires that drivers be able to make descriptor resources available when
    the 'prep' routine is polled.

    Signed-off-by: Dan Williams
    Acked-by: Shannon Nelson

    Dan Williams
     
  • Remove the unused ASYNC_TX_ASSUME_COHERENT flag. Async_tx is
    meant to hide the difference between asynchronous hardware and synchronous
    software operations, this flag requires clients to understand cache
    coherency consequences of the async path.

    Signed-off-by: Dan Williams
    Reviewed-by: Haavard Skinnemoen

    Dan Williams
     
  • single list_head variable initialized with LIST_HEAD_INIT could almost
    always can be replaced with LIST_HEAD declaration, this shrinks the code
    and looks better.

    Signed-off-by: Denis Cheng
    Signed-off-by: Dan Williams

    Denis Cheng
     
  • do_async_xor must be compiled away on !HAS_DMA archs.

    Signed-off-by: Dan Williams
    Acked-by: Cornelia Huck

    Dan Williams
     

26 Jan, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (125 commits)
    [CRYPTO] twofish: Merge common glue code
    [CRYPTO] hifn_795x: Fixup container_of() usage
    [CRYPTO] cast6: inline bloat--
    [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long
    [CRYPTO] tcrypt: Make xcbc available as a standalone test
    [CRYPTO] xcbc: Remove bogus hash/cipher test
    [CRYPTO] xcbc: Fix algorithm leak when block size check fails
    [CRYPTO] tcrypt: Zero axbuf in the right function
    [CRYPTO] padlock: Only reset the key once for each CBC and ECB operation
    [CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h
    [CRYPTO] salsa20-asm: Remove unnecessary dependency on CRYPTO_SALSA20
    [CRYPTO] tcrypt: Add select of AEAD
    [CRYPTO] salsa20: Add x86-64 assembly version
    [CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version)
    [CRYPTO] gcm: Introduce rfc4106
    [CRYPTO] api: Show async type
    [CRYPTO] chainiv: Avoid lock spinning where possible
    [CRYPTO] seqiv: Add select AEAD in Kconfig
    [CRYPTO] scatterwalk: Handle zero nbytes in scatterwalk_map_and_copy
    [CRYPTO] null: Allow setkey on digest_null
    ...

    Linus Torvalds
     

11 Jan, 2008

23 commits