linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: rsa - fix a potential race condition in build
@ 2016-12-02 23:41 Yang Shi
  2016-12-05  6:48 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Shi @ 2016-12-02 23:41 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, linux-kernel, yang.shi

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: rsa - fix a potential race condition in build
  2016-12-02 23:41 [PATCH] crypto: rsa - fix a potential race condition in build Yang Shi
@ 2016-12-05  6:48 ` Herbert Xu
  2016-12-05 17:49   ` Yang Shi
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2016-12-05  6:48 UTC (permalink / raw)
  To: Yang Shi; +Cc: davem, linux-crypto, linux-kernel

On Fri, Dec 02, 2016 at 03:41:04PM -0800, Yang Shi wrote:
> 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>

This should already be fixed in the latest crypto tree.  Could
you please double-check?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: rsa - fix a potential race condition in build
  2016-12-05  6:48 ` Herbert Xu
@ 2016-12-05 17:49   ` Yang Shi
  0 siblings, 0 replies; 3+ messages in thread
From: Yang Shi @ 2016-12-05 17:49 UTC (permalink / raw)
  To: Herbert Xu; +Cc: davem, linux-crypto, linux-kernel

On 12/4/2016 10:48 PM, Herbert Xu wrote:
> On Fri, Dec 02, 2016 at 03:41:04PM -0800, Yang Shi wrote:
>> 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>
> This should already be fixed in the latest crypto tree.  Could
> you please double-check?

Thanks, Herbert, I just found the commit. Please ignore my patch, sorry 
for the inconvenience.

I will backport that commit to our kernel tree.

Yang

>
> Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-05 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 23:41 [PATCH] crypto: rsa - fix a potential race condition in build Yang Shi
2016-12-05  6:48 ` Herbert Xu
2016-12-05 17:49   ` Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).