diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 19 | ||||
-rw-r--r-- | lib/Kconfig.debug | 2 | ||||
-rw-r--r-- | lib/Makefile | 2 | ||||
-rw-r--r-- | lib/mpi/mpicoder.c | 2 |
4 files changed, 13 insertions, 12 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 201e1b33d721..169eb7c598e5 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -286,25 +286,24 @@ config CORDIC calculations are in fixed point. Module will be called cordic. config MPILIB - tristate "Multiprecision maths library" + tristate help Multiprecision maths library from GnuPG. It is used to implement RSA digital signature verification, which is used by IMA/EVM digital signature extension. config MPILIB_EXTRA - bool "Multiprecision maths library - additional sources" + bool depends on MPILIB help - Multiprecision maths library from GnuPG. - It is used to implement RSA digital signature verification, - which is used by IMA/EVM digital signature extension. - This code in unnecessary for RSA digital signature verification, - and can be compiled if needed. + Additional sources of multiprecision maths library from GnuPG. + This code is unnecessary for RSA digital signature verification, + but can be compiled if needed. -config DIGSIG - tristate "In-kernel signature checker" - depends on KEYS +config SIGNATURE + tristate + depends on KEYS && CRYPTO + select CRYPTO_SHA1 select MPILIB help Digital signature verification. Currently only RSA is supported. diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 82928f5ea049..8745ac7d1f75 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -414,7 +414,7 @@ config SLUB_STATS config DEBUG_KMEMLEAK bool "Kernel memory leak detector" - depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ + depends on DEBUG_KERNEL && EXPERIMENTAL && \ (X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || MICROBLAZE || TILE) select DEBUG_FS diff --git a/lib/Makefile b/lib/Makefile index dace162c7e1c..d71aae1b01b3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -119,7 +119,7 @@ obj-$(CONFIG_CORDIC) += cordic.o obj-$(CONFIG_DQL) += dynamic_queue_limits.o obj-$(CONFIG_MPILIB) += mpi/ -obj-$(CONFIG_DIGSIG) += digsig.o +obj-$(CONFIG_SIGNATURE) += digsig.o hostprogs-y := gen_crc32table clean-files := crc32table.h diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index fe84bb978e3b..716802b774ea 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c @@ -255,6 +255,8 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign) if (!n) n++; /* avoid zero length allocation */ p = buffer = kmalloc(n, GFP_KERNEL); + if (!p) + return NULL; for (i = a->nlimbs - 1; i >= 0; i--) { alimb = a->d[i]; |