31 Jul, 2010

3 commits

  • We pass a pointer to the new padata cpumasks to the cpumask_change_notifier
    chain. So users can access the cpumasks without the need of an extra
    padata_get_cpumask function.

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

    Steffen Klassert
     
  • padata_set_cpumask needs to be protected by a lock. We make
    __padata_set_cpumasks unlocked and static. So this function
    can be used by the exported and locked padata_set_cpumask and
    padata_set_cpumasks functions.

    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

4 commits


19 Jul, 2010

4 commits

  • This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
    .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
    PCI_VDEVICE macro, and thus improves readability.

    Signed-off-by: Peter Huewe
    Signed-off-by: Herbert Xu

    Peter Huewe
     
  • 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
     
  • Added sysfs primitives to padata subsystem. Now API user may
    embedded kobject each padata instance contains into any sysfs
    hierarchy. For now padata sysfs interface provides only
    two objects:
    serial_cpumask [RW] - cpumask for serial workers
    parallel_cpumask [RW] - cpumask for parallel workers

    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

7 commits

  • This patch updates the padata documentation to the changed
    API of padata_start/padata_stop and padata_do parallel.

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

    Steffen Klassert
     
  • We count the number of processed objects on a percpu basis,
    so we need to go through all the percpu reorder queues to calculate
    the sequence number of the next object that needs serialization.
    This patch changes this to count the number of processed objects
    global. So we can calculate the sequence number and the percpu
    reorder queue of the next object that needs serialization without
    searching through the percpu reorder queues. This avoids some
    accesses to memory of foreign cpus.

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

    Steffen Klassert
     
  • 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 fixes a bug when the padata cpumask does not
    intersect with the active cpumask. In this case we get a
    division by zero in padata_alloc_pd and we end up with a
    useless padata instance. Padata can end up with an empty
    cpumask for two reasons:

    1. A user removed the last cpu that belongs to the padata
    cpumask and the active cpumask.

    2. The last cpu that belongs to the padata cpumask and the
    active cpumask goes offline.

    We introduce a function padata_validate_cpumask to check if the padata
    cpumask does intersect with the active cpumask. If the cpumasks do not
    intersect we mark the instance as invalid, so it can't be used. We do not
    allocate the cpumask dependend recources in this case. This fixes the
    division by zero and keeps the padate instance in a consistent state.

    It's not possible to trigger this bug by now because the only padata user,
    pcrypt uses always the possible cpumask.

    Reported-by: Dan Kruchinin
    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     
  • This patch makes padata_stop to block until the padata
    instance is unused. Also we split padata_stop to a locked
    and a unlocked version. This is in preparation to be able
    to change the cpumask after a call to patata stop.

    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
     
  • The below patch gets rid of an unused variable ctx reported by
    GCC when building the kernel.
    CC [M] drivers/crypto/hifn_795x.o
    drivers/crypto/hifn_795x.c: In function 'hifn_flush':
    drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used
    drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
    drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

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

    Justin P. Mattock
     

05 Jul, 2010

1 commit


16 Jun, 2010

1 commit

  • Correct ahash_process_req() to properly handle cases
    where the total hash amount is a multiple of the blocksize.
    The SEC must have some data to hash during the very last
    descriptor operation; so up to one whole blocksize
    of data is buffered until the final hash.

    Signed-off-by: Lee Nipper
    Signed-off-by: Herbert Xu

    Lee Nipper
     

03 Jun, 2010

4 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
     
  • MAX_SEQ_NR is used in padata_alloc_pd() like this:

    pd->max_seq_nr = (MAX_SEQ_NR / num_cpus) * num_cpus - 1;

    It needs parenthesis or the divide by num_cpus takes precedence over the
    subtraction.

    Signed-off-by: Dan Carpenter
    Acked-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Dan Carpenter
     

26 May, 2010

16 commits