08 Oct, 2012

1 commit

  • Provide count_leading/trailing_zeros() macros based on extant arch bit scanning
    functions rather than reimplementing from scratch in MPILIB.

    Whilst we're at it, turn count_foo_zeros(n, x) into n = count_foo_zeros(x).

    Also move the definition to asm-generic as other people may be interested in
    using it.

    Signed-off-by: David Howells
    Cc: David S. Miller
    Cc: Dmitry Kasatkin
    Cc: Arnd Bergmann
    Signed-off-by: Rusty Russell

    David Howells
     

26 May, 2012

1 commit

  • MPI library is used by RSA verification implementation.
    Few files contains functions which are never called.

    James Morris has asked to remove all of them.

    Signed-off-by: Dmitry Kasatkin
    Requested-by: James Morris
    Signed-off-by: James Morris

    Dmitry Kasatkin
     

18 Apr, 2012

1 commit

  • At the start of the function we assign 'a->d' to 'ap'. Then we use the
    RESIZE_IF_NEEDED macro on 'a' - this may free 'a->d' and replace it
    with newly allocaetd storage. In that case, we'll be operating on
    freed memory further down in the function when we index into 'ap[]'.
    Since we don't actually need 'ap' until after the use of the
    RESIZE_IF_NEEDED macro we can just delay the assignment to it until
    after we've potentially resized, thus avoiding the issue.

    While I was there anyway I also changed the integer variable 'n' to be
    const. It might as well be since we only assign to it once and use it
    as a constant, and then the compiler will tell us if we ever assign to
    it in the future.

    Signed-off-by: Jesper Juhl
    Acked-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Jesper Juhl
     

02 Feb, 2012

1 commit

  • Both sparc 32-bit's software divide assembler and MPILIB provide
    clz_tab[] with identical contents.

    Break it out into a seperate object file and select it when
    SPARC32 or MPILIB is set.

    Reported-by: Al Viro
    Signed-off-by: David S. Miller
    Signed-off-by: James Morris

    David Miller
     

09 Nov, 2011

1 commit

  • Adds the multi-precision-integer maths library which was originally taken
    from GnuPG and ported to the kernel by (among others) David Howells.
    This version is taken from Fedora kernel 2.6.32-71.14.1.el6.
    The difference is that checkpatch reported errors and warnings have been fixed.

    This library is used to implemenet RSA digital signature verification
    used in IMA/EVM integrity protection subsystem.

    Due to patch size limitation, the patch is divided into 4 parts.

    Signed-off-by: Dmitry Kasatkin

    Dmitry Kasatkin