12 Nov, 2010

1 commit


28 Oct, 2010

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (48 commits)
    DMAENGINE: move COH901318 to arch_initcall
    dma: imx-dma: fix signedness bug
    dma/timberdale: simplify conditional
    ste_dma40: remove channel_type
    ste_dma40: remove enum for endianess
    ste_dma40: remove TIM_FOR_LINK option
    ste_dma40: move mode_opt to separate config
    ste_dma40: move channel mode to a separate field
    ste_dma40: move priority to separate field
    ste_dma40: add variable to indicate valid dma_cfg
    async_tx: make async_tx channel switching opt-in
    move async raid6 test to lib/Kconfig.debug
    dmaengine: Add Freescale i.MX1/21/27 DMA driver
    intel_mid_dma: change the slave interface
    intel_mid_dma: fix the WARN_ONs
    intel_mid_dma: Add sg list support to DMA driver
    intel_mid_dma: Allow DMAC2 to share interrupt
    intel_mid_dma: Allow IRQ sharing
    intel_mid_dma: Add runtime PM support
    DMAENGINE: define a dummy filter function for ste_dma40
    ...

    Linus Torvalds
     

27 Oct, 2010

1 commit

  • Ensure kmap_atomic() usage is strictly nested

    Signed-off-by: Peter Zijlstra
    Reviewed-by: Rik van Riel
    Acked-by: Chris Metcalf
    Cc: David Howells
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Steven Rostedt
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: David Miller
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

25 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: Makefile - replace the use of -objs with -y
    crypto: hifn_795x - use cancel_delayed_work_sync()
    crypto: talitos - sparse check endian fixes
    crypto: talitos - fix checkpatch warning
    crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
    crypto: cryptd - Adding the AEAD interface type support to cryptd
    crypto: n2_crypto - Niagara2 driver needs to depend upon CRYPTO_DES
    crypto: Kconfig - update broken web addresses
    crypto: omap-sham - Adjust DMA parameters
    crypto: fips - FIPS requires algorithm self-tests
    crypto: omap-aes - OMAP2/3 AES hw accelerator driver
    crypto: updates to enable omap aes
    padata: add missing __percpu markup in include/linux/padata.h
    MAINTAINERS: Add maintainer entries for padata/pcrypt

    Linus Torvalds
     

08 Oct, 2010

1 commit

  • The prompt for "Self test for hardware accelerated raid6 recovery" does not
    belong in the top level configuration menu. All the options in
    crypto/async_tx/Kconfig are selected and do not depend on CRYPTO.
    Kconfig.debug seems like a reasonable fit.

    Cc: Herbert Xu
    Cc: David Woodhouse
    Signed-off-by: Dan Williams

    Dan Williams
     

07 Oct, 2010

1 commit


20 Sep, 2010

1 commit

  • This patch adds AEAD support into the cryptd framework. Having AEAD
    support in cryptd enables crypto drivers that use the AEAD
    interface type (such as the patch for AEAD based RFC4106 AES-GCM
    implementation using Intel New Instructions) to leverage cryptd for
    asynchronous processing.

    Signed-off-by: Adrian Hoban
    Signed-off-by: Tadeusz Struk
    Signed-off-by: Gabriele Paoloni
    Signed-off-by: Aidan O'Mahony
    Signed-off-by: Herbert Xu

    Adrian Hoban
     

12 Sep, 2010

1 commit

  • Below is a patch to update the broken web addresses, in crypto/*
    that I could locate. Some are just simple typos that needed to be
    fixed, and some had a change in location altogether..
    let me know if any of them need to be changed and such.

    Signed-off-by: Justin P. Mattock
    Signed-off-by: Herbert Xu

    Justin P. Mattock
     

08 Sep, 2010

1 commit


03 Sep, 2010

1 commit


09 Aug, 2010

1 commit


06 Aug, 2010

3 commits

  • On Thu, Aug 05, 2010 at 07:01:21PM -0700, Linus Torvalds wrote:
    > On Thu, Aug 5, 2010 at 6:40 PM, Herbert Xu wrote:
    > >
    > > -config CRYPTO_MANAGER_TESTS
    > > - bool "Run algolithms' self-tests"
    > > - default y
    > > - depends on CRYPTO_MANAGER2
    > > +config CRYPTO_MANAGER_DISABLE_TESTS
    > > + bool "Disable run-time self tests"
    > > + depends on CRYPTO_MANAGER2 && EMBEDDED
    >
    > Why do you still want to force-enable those tests? I was going to
    > complain about the "default y" anyway, now I'm _really_ complaining,
    > because you've now made it impossible to disable those tests. Why?

    As requested, this patch sets the default to y and removes the
    EMBEDDED dependency.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch fixes a serious bug in the test disabling patch where
    it can cause an spurious load of the cryptomgr module even when
    it's compiled in.

    It also negates the test disabling option so that its absence
    causes tests to be enabled.

    The Kconfig option is also now behind EMBEDDED.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • If a scatterwalk chain contains an entry with an unaligned offset then
    hash_walk_next() will cut off the next step at the next alignment point.

    However, if the entry ends before the next alignment point then we a loop,
    which leads to a kernel oops.

    Fix this by checking whether the next aligment point is before the end of the
    current entry.

    Signed-off-by: Szilveszter Ördög
    Acked-by: David S. Miller
    Signed-off-by: Herbert Xu

    Szilveszter Ördög
     

05 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (39 commits)
    random: Reorder struct entropy_store to remove padding on 64bits
    padata: update API documentation
    padata: Remove padata_get_cpumask
    crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier
    crypto: pcrypt - Rename pcrypt_instance
    padata: Pass the padata cpumasks to the cpumask_change_notifier chain
    padata: Rearrange set_cpumask functions
    padata: Rename padata_alloc functions
    crypto: pcrypt - Dont calulate a callback cpu on empty callback cpumask
    padata: Check for valid cpumasks
    padata: Allocate cpumask dependend recources in any case
    padata: Fix cpu index counting
    crypto: geode_aes - Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
    pcrypt: Added sysfs interface to pcrypt
    padata: Added sysfs primitives to padata subsystem
    padata: Make two separate cpumasks
    padata: update documentation
    padata: simplify serialization mechanism
    padata: make padata_do_parallel to return zero on success
    padata: Handle empty padata cpumasks
    ...

    Linus Torvalds
     

31 Jul, 2010

3 commits

  • The padata cpumask change notifier passes a padata_cpumask to the
    notifier chain. So we use this cpumask instead of asking padata for
    the cpumask.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     
  • In the crypto-layer an instance refers usually to a crypto instance.
    The struct pcrypt_instance is not related to a crypto instance.
    It rather contains the padata informations, so we rename it to
    padata_pcrypt. The functions that handle this struct are renamed
    accordingly.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     
  • We rename padata_alloc to padata_alloc_possible because this
    function allocates a padata_instance and uses the cpu_possible
    mask for parallel and serial workers. Also we rename __padata_alloc
    to padata_alloc to avoid to export underlined functions. Underlined
    functions are considered to be private to padata. Users are updated
    accordingly.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     

26 Jul, 2010

1 commit


19 Jul, 2010

2 commits

  • Added sysfs interface to pcrypt. Now pcrypt subsystem creates two
    sysfs directories with corresponding padata sysfs objects:
    /sys/kernel/pcrypt/[pencrypt|pdecrypt]

    Signed-off-by: Dan Kruchinin
    Signed-off-by: Herbert Xu

    Dan Kruchinin
     
  • The aim of this patch is to make two separate cpumasks
    for padata parallel and serial workers respectively.
    It allows user to make more thin and sophisticated configurations
    of padata framework. For example user may bind parallel and serial workers to non-intersecting
    CPU groups to gain better performance. Also each padata instance has notifiers chain for its
    cpumasks now. If either parallel or serial or both masks were changed all
    interested subsystems will get notification about that. It's especially useful
    if padata user uses algorithm for callback CPU selection according to serial cpumask.

    Signed-off-by: Dan Kruchinin
    Signed-off-by: Herbert Xu

    Dan Kruchinin
     

14 Jul, 2010

2 commits

  • To return -EINPROGRESS on success in padata_do_parallel was
    considered to be odd. This patch changes this to return zero
    on success. Also the only user of padata, pcrypt is adapted to
    convert a return of zero to -EINPROGRESS within the crypto layer.
    This also removes the pcrypt fallback if padata_do_parallel
    was called on a not running padata instance as we can't handle it
    anymore. This fallback was unused, so it's save to remove it.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     
  • This patch introduces the PADATA_INVALID flag which is
    checked on padata start. This will be used to mark a padata
    instance as invalid, if the padata cpumask does not intersect
    with the active cpumask. we change padata_start to return an
    error if the PADATA_INVALID is set. Also we adapt the only
    padata user, pcrypt to this change.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     

23 Jun, 2010

1 commit

  • Stanse found a potential NULL dereference in ablkcipher_next_slow.
    Even though kmalloc fails, its retval is dereferenced later. Return
    from that function properly earlier.

    Signed-off-by: Jiri Slaby
    Acked-by: David S. Miller
    Signed-off-by: Herbert Xu

    Jiri Slaby
     

03 Jun, 2010

3 commits

  • This fixes the broken autoloading of the corresponding twofish assembler
    ciphers on x86 and x86_64 if they are available. The module name of the
    generic implementation was in conflict with the alias in the assembler
    modules. The generic twofish c implementation is renamed to
    twofish_generic according to the other algorithms with assembler
    implementations and an module alias is added for 'twofish'. You can now
    load 'twofish' giving you the best implementation by priority,
    'twofish-generic' to get the c implementation or 'twofish-asm' to get
    the assembler version of cipher.

    Signed-off-by: Joachim Fritschi
    Signed-off-by: Herbert Xu

    Joachim Fritschi
     
  • By default, CONFIG_CRYPTO_MANAGER_TESTS will be enabled and thus
    self-tests will still run, but it is now possible to disable them
    to gain some time during bootup.

    Signed-off-by: Alexander Shishkin
    Signed-off-by: Herbert Xu

    Alexander Shishkin
     
  • The PCOMP Kconfig entry current allows the following combination
    which is illegal:

    ZLIB=y
    PCOMP=y
    ALGAPI=m
    ALGAPI2=y
    MANAGER=m
    MANAGER2=m

    This patch fixes this by adding PCOMP2 so that PCOMP can select
    ALGAPI to propagate the setting to MANAGER2.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

26 May, 2010

2 commits


22 May, 2010

2 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    DMAENGINE: extend the control command to include an arg
    async_tx: trim dma_async_tx_descriptor in 'no channel switch' case
    DMAENGINE: DMA40 fix for allocation of logical channel 0
    DMAENGINE: DMA40 support paused channel status
    dmaengine: mpc512x: Use resource_size
    DMA ENGINE: Do not reset 'private' of channel
    ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
    ioat3: disable cacheline-unaligned transfers for raid operations
    ioat2,3: convert to producer/consumer locking
    ioat: convert to circ_buf
    DMAENGINE: Support for ST-Ericssons DMA40 block v3
    async_tx: use of kzalloc/kfree requires the include of slab.h
    dmaengine: provide helper for setting txstate
    DMAENGINE: generic channel status v2
    DMAENGINE: generic slave control v2
    dma: timb-dma: Update comment and fix compiler warning
    dma: Add timb-dma
    DMAENGINE: COH 901 318 fix bytesleft
    DMAENGINE: COH 901 318 rename confusing vars

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (46 commits)
    random: simplify fips mode
    crypto: authenc - Fix cryptlen calculation
    crypto: talitos - add support for sha224
    crypto: talitos - add hash algorithms
    crypto: talitos - second prepare step for adding ahash algorithms
    crypto: talitos - prepare for adding ahash algorithms
    crypto: n2 - Add Niagara2 crypto driver
    crypto: skcipher - Add ablkcipher_walk interfaces
    crypto: testmgr - Add testing for async hashing and update/final
    crypto: tcrypt - Add speed tests for async hashing
    crypto: scatterwalk - Fix scatterwalk_done() test
    crypto: hifn_795x - Rename ablkcipher_walk to hifn_cipher_walk
    padata: Use get_online_cpus/put_online_cpus in padata_free
    padata: Add some code comments
    padata: Flush the padata queues actively
    padata: Use a timer to handle remaining objects in the reorder queues
    crypto: shash - Remove usage of CRYPTO_MINALIGN
    crypto: mv_cesa - Use resource_size
    crypto: omap - OMAP macros corrected
    padata: Use get_online_cpus/put_online_cpus
    ...

    Fix up conflicts in arch/arm/mach-omap2/devices.c

    Linus Torvalds
     

21 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
    vlynq: make whole Kconfig-menu dependant on architecture
    add descriptive comment for TIF_MEMDIE task flag declaration.
    EEPROM: max6875: Header file cleanup
    EEPROM: 93cx6: Header file cleanup
    EEPROM: Header file cleanup
    agp: use NULL instead of 0 when pointer is needed
    rtc-v3020: make bitfield unsigned
    PCI: make bitfield unsigned
    jbd2: use NULL instead of 0 when pointer is needed
    cciss: fix shadows sparse warning
    doc: inode uses a mutex instead of a semaphore.
    uml: i386: Avoid redefinition of NR_syscalls
    fix "seperate" typos in comments
    cocbalt_lcdfb: correct sections
    doc: Change urls for sparse
    Powerpc: wii: Fix typo in comment
    i2o: cleanup some exit paths
    Documentation/: it's -> its where appropriate
    UML: Fix compiler warning due to missing task_struct declaration
    UML: add kernel.h include to signal.c
    ...

    Linus Torvalds
     

20 May, 2010

1 commit


19 May, 2010

5 commits

  • These are akin to the blkcipher_walk helpers.

    The main differences in the async variant are:

    1) Only physical walking is supported. We can't hold on to
    kmap mappings across the async operation to support virtual
    ablkcipher_walk operations anyways.

    2) Bounce buffers used for async more need to be persistent and
    freed at a later point in time when the async op completes.
    Therefore we maintain a list of writeback buffers and require
    that the ablkcipher_walk user call the 'complete' operation
    so we can copy the bounce buffers out to the real buffers and
    free up the bounce buffer chunks.

    These interfaces will be used by the new Niagara2 crypto driver.

    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    David S. Miller
     
  • Extend testmgr such that it tests async hash algorithms,
    and that for both sync and async hashes it tests both
    ->digest() and ->update()/->final() sequences.

    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    David S. Miller
     
  • These are invoked in the 'mode' range of 400 to 499.

    The cost of async vs. sync for the software algorithm implementations
    varies. It can be as low as 16 cycles but as much as a couple hundred.

    Here two runs of md5 testing, async then sync:

    testing speed of async md5
    test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 2448 cycles/operation, 153 cycles/byte
    test 1 ( 64 byte blocks, 16 bytes per update, 4 updates): 4992 cycles/operation, 78 cycles/byte
    test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 3808 cycles/operation, 59 cycles/byte
    test 3 ( 256 byte blocks, 16 bytes per update, 16 updates): 14000 cycles/operation, 54 cycles/byte
    test 4 ( 256 byte blocks, 64 bytes per update, 4 updates): 8480 cycles/operation, 33 cycles/byte
    test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 7280 cycles/operation, 28 cycles/byte
    test 6 ( 1024 byte blocks, 16 bytes per update, 64 updates): 50016 cycles/operation, 48 cycles/byte
    test 7 ( 1024 byte blocks, 256 bytes per update, 4 updates): 22496 cycles/operation, 21 cycles/byte
    test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 21232 cycles/operation, 20 cycles/byte
    test 9 ( 2048 byte blocks, 16 bytes per update, 128 updates): 117184 cycles/operation, 57 cycles/byte
    test 10 ( 2048 byte blocks, 256 bytes per update, 8 updates): 43008 cycles/operation, 21 cycles/byte
    test 11 ( 2048 byte blocks, 1024 bytes per update, 2 updates): 40176 cycles/operation, 19 cycles/byte
    test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 39888 cycles/operation, 19 cycles/byte
    test 13 ( 4096 byte blocks, 16 bytes per update, 256 updates): 194176 cycles/operation, 47 cycles/byte
    test 14 ( 4096 byte blocks, 256 bytes per update, 16 updates): 84096 cycles/operation, 20 cycles/byte
    test 15 ( 4096 byte blocks, 1024 bytes per update, 4 updates): 78336 cycles/operation, 19 cycles/byte
    test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 77120 cycles/operation, 18 cycles/byte
    test 17 ( 8192 byte blocks, 16 bytes per update, 512 updates): 403056 cycles/operation, 49 cycles/byte
    test 18 ( 8192 byte blocks, 256 bytes per update, 32 updates): 166112 cycles/operation, 20 cycles/byte
    test 19 ( 8192 byte blocks, 1024 bytes per update, 8 updates): 154768 cycles/operation, 18 cycles/byte
    test 20 ( 8192 byte blocks, 4096 bytes per update, 2 updates): 151904 cycles/operation, 18 cycles/byte
    test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 155456 cycles/operation, 18 cycles/byte

    testing speed of md5
    test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 2208 cycles/operation, 138 cycles/byte
    test 1 ( 64 byte blocks, 16 bytes per update, 4 updates): 5008 cycles/operation, 78 cycles/byte
    test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 3600 cycles/operation, 56 cycles/byte
    test 3 ( 256 byte blocks, 16 bytes per update, 16 updates): 14080 cycles/operation, 55 cycles/byte
    test 4 ( 256 byte blocks, 64 bytes per update, 4 updates): 8560 cycles/operation, 33 cycles/byte
    test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 7040 cycles/operation, 27 cycles/byte
    test 6 ( 1024 byte blocks, 16 bytes per update, 64 updates): 50592 cycles/operation, 49 cycles/byte
    test 7 ( 1024 byte blocks, 256 bytes per update, 4 updates): 22736 cycles/operation, 22 cycles/byte
    test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 24960 cycles/operation, 24 cycles/byte
    test 9 ( 2048 byte blocks, 16 bytes per update, 128 updates): 99312 cycles/operation, 48 cycles/byte
    test 10 ( 2048 byte blocks, 256 bytes per update, 8 updates): 43520 cycles/operation, 21 cycles/byte
    test 11 ( 2048 byte blocks, 1024 bytes per update, 2 updates): 40704 cycles/operation, 19 cycles/byte
    test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 39552 cycles/operation, 19 cycles/byte
    test 13 ( 4096 byte blocks, 16 bytes per update, 256 updates): 196720 cycles/operation, 48 cycles/byte
    test 14 ( 4096 byte blocks, 256 bytes per update, 16 updates): 85152 cycles/operation, 20 cycles/byte
    test 15 ( 4096 byte blocks, 1024 bytes per update, 4 updates): 79408 cycles/operation, 19 cycles/byte
    test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 76816 cycles/operation, 18 cycles/byte
    test 17 ( 8192 byte blocks, 16 bytes per update, 512 updates): 391520 cycles/operation, 47 cycles/byte
    test 18 ( 8192 byte blocks, 256 bytes per update, 32 updates): 168464 cycles/operation, 20 cycles/byte
    test 19 ( 8192 byte blocks, 1024 bytes per update, 8 updates): 156912 cycles/operation, 19 cycles/byte
    test 20 ( 8192 byte blocks, 4096 bytes per update, 2 updates): 154016 cycles/operation, 18 cycles/byte
    test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 153856 cycles/operation, 18 cycles/byte

    We can ditch the sync hash code at some point if we feel that makes
    sense. For now I've left it there.

    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    David S. Miller
     
  • We are done with the scattergather entry when the walk offset goes
    past sg->offset + sg->length, not when it crosses a page boundary.

    There is a similarly queer test in the second half of
    scatterwalk_pagedone() that probably needs some scrutiny.

    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    David S. Miller
     
  • The macro CRYPTO_MINALIGN is not meant to be used directly. This
    patch replaces it with crypto_tfm_ctx_alignment.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

18 May, 2010

1 commit


05 May, 2010

1 commit

  • The raid6 recovery code should immediately drop back to the optimized
    synchronous path when a p+q dma resource is not available. Otherwise we
    run the non-optimized/multi-pass async code in sync mode.

    Verified with raid6test (NDISKS=255)

    Applies to kernels >= 2.6.32.

    Cc:
    Acked-by: NeilBrown
    Reported-by: H. Peter Anvin
    Signed-off-by: Dan Williams
    Signed-off-by: Linus Torvalds

    Dan Williams