summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-12-13 09:15:50 -0500
committerGitHub <noreply@github.com>2016-12-13 09:15:50 -0500
commit01d022e16b0ec28cf531d6280781248238a2eda1 (patch)
tree26268ee4b058a288365c0ead2c8125f4fbb29e08 /pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch
parentd918c80e133d00693973fb15ae12b6fd0b2d7a5c (diff)
parent7a813d3f6d3b983b67683234fe1fe77afb3d97e5 (diff)
downloadnixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar.gz
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar.bz2
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar.lz
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar.xz
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.tar.zst
nixlib-01d022e16b0ec28cf531d6280781248238a2eda1.zip
Merge pull request #21118 from grahamc/fix-rsa-build-failure
linux_{4_8,grsec_nixos}: patch to fix build failure
Diffstat (limited to 'pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch')
-rw-r--r--pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch b/pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch
new file mode 100644
index 000000000000..9f5790862b65
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/multithreaded-rsapubkey-asn1.patch
@@ -0,0 +1,45 @@
+
+From	Yang Shi <>
+Subject	[PATCH] crypto: rsa - fix a potential race condition in build
+Date	Fri, 2 Dec 2016 15:41:04 -0800
+
+
+When building kernel with RSA enabled with multithreaded, the below
+compile failure might be caught:
+
+| /buildarea/kernel-source/crypto/rsa_helper.c:18:28: fatal error: rsapubkey-asn1.h: No such file or directory
+| #include "rsapubkey-asn1.h"
+| ^
+| compilation terminated.
+| CC crypto/rsa-pkcs1pad.o
+| CC crypto/algboss.o
+| CC crypto/testmgr.o
+| make[3]: *** [/buildarea/kernel-source/scripts/Makefile.build:289: crypto/rsa_helper.o] Error 1
+| make[3]: *** Waiting for unfinished jobs....
+| make[2]: *** [/buildarea/kernel-source/Makefile:969: crypto] Error 2
+| make[1]: *** [Makefile:150: sub-make] Error 2
+| make: *** [Makefile:24: __sub-make] Error 2
+
+The header file is not generated before rsa_helper is compiled, so
+adding dependency to avoid such issue.
+
+Signed-off-by: Yang Shi <yang.shi@windriver.com>
+
+---
+ crypto/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/crypto/Makefile b/crypto/Makefile
+index 99cc64a..8db39f9 100644
+--- a/crypto/Makefile
++++ b/crypto/Makefile
+@@ -40,6 +40,7 @@ obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o
+
+ $(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
+ $(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
++$(obj)/rsa_helper.o: $(obj)/rsa_helper.c $(obj)/rsaprivkey-asn1.h
+ clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
+ clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
+
+--
+2.0.2