26 May, 2012
2 commits
-
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 -
This reverts commit 7e8dec918ef8e0f68b4937c3c50fa57002077a4d.
RSA verification implementation does not use this code.
James Morris has asked to remove that.Signed-off-by: Dmitry Kasatkin
Requested-by: James Morris
Signed-off-by: James Morris
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
02 Feb, 2012
2 commits
-
This copy of longlong.h is extremely dated and results in compile
errors on sparc32 when MPILIB is enabled, copy over the more uptodate
implementation from arch/sparc/math/sfp-util_32.hReported-by: Al Viro
Signed-off-by: David S. Miller
Signed-off-by: James Morris -
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
01 Feb, 2012
8 commits
-
Added missing NULL check after mpi_alloc_limb_space().
Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
Comment explains that existing clients do not call this function
with dsize == 0, which means that 1/0 should not happen.Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
Buggy client might pass zero nlimbs which is meaningless.
Added check for zero length.Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
do_encode_md() and mpi_get_keyid() are not parts of mpi library.
They were used early versions of gnupg and in digsig project,
but they are not used neither here nor there anymore.Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
Divisor length should not be 0.
Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
Definitely better to return error code than to divide by zero.
Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
MPI_NULL is replaced with normal NULL.
Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris -
Added missing NULL check after mpi_alloc().
Signed-off-by: Dmitry Kasatkin
Reviewed-by: Tetsuo Handa
Signed-off-by: James Morris
19 Jan, 2012
1 commit
-
Add a missing ENOMEM check.
Signed-off-by: David Howells
Acked-by: Mimi Zohar
Signed-off-by: James Morris
07 Dec, 2011
1 commit
-
We can't call mpi_free() on the elements if the first kzalloc() fails.
Signed-off-by: Dan Carpenter
Signed-off-by: Dmitry Kasatkin
Signed-off-by: James Morris
09 Nov, 2011
4 commits
-
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.
This code is unnecessary for RSA digital signature verification,
but for completeness it is included here and can be compiled,
if CONFIG_MPILIB_EXTRA is enabled.Signed-off-by: Dmitry Kasatkin
-
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
-
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
-
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