diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-05-31 17:52:30 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:27:30 +0100 |
commit | a3a6c10bd539868bf3de04f0848364e96fb5a313 (patch) | |
tree | def5084774dd9a209cbdd06490e88497aa132913 /meta/recipes-support/rng-tools/rng-tools | |
parent | 36aa1ce0ca58c7ef5fec3d69ae53b4037f15f4dc (diff) | |
download | poky-a3a6c10bd539868bf3de04f0848364e96fb5a313.tar.gz |
rng-tools: upgrade 6.9 -> 6.10
(From OE-Core rev: 368405e33a3db97a85cfd4cb06cb5a105b924d3e)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/rng-tools/rng-tools')
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch | 42 | ||||
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch | 51 |
2 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch b/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch new file mode 100644 index 0000000000..96301617b2 --- /dev/null +++ b/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From a4b6d9ce64f132e463b9091d0536913ddaf11516 Mon Sep 17 00:00:00 2001 | ||
2 | From: Neil Horman <nhorman@tuxdriver.com> | ||
3 | Date: Thu, 30 Apr 2020 16:57:35 -0400 | ||
4 | Subject: [PATCH] Remove name conflict with libc encrypt | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Forgot to fixup the funciton name conflict with libcs encrypt() function | ||
10 | on power systems | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/nhorman/rng-tools/commit/a4b6d9ce64f132e463b9091d0536913ddaf11516] | ||
13 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
14 | Signed-off-by: Neil Horman <nhorman@tuxdriver.com> | ||
15 | Reported-by: Natanael Copa <ncopa@alpinelinux.org> | ||
16 | Reported-by: "Milan P. Stanić" <mps@arvanta.net> | ||
17 | --- | ||
18 | rngd_darn.c | 4 ++-- | ||
19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/rngd_darn.c b/rngd_darn.c | ||
22 | index 35df7a1..9345895 100644 | ||
23 | --- a/rngd_darn.c | ||
24 | +++ b/rngd_darn.c | ||
25 | @@ -109,7 +109,7 @@ static int init_openssl(struct rng *ent_src) | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | -int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, | ||
30 | +static int osslencrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, | ||
31 | unsigned char *iv, unsigned char *ciphertext) | ||
32 | { | ||
33 | int len; | ||
34 | @@ -150,7 +150,7 @@ static inline int openssl_mangle(unsigned char *tmp, struct rng *ent_src) | ||
35 | unsigned char ciphertext[CHUNK_SIZE * RDRAND_ROUNDS]; | ||
36 | |||
37 | /* Encrypt the plaintext */ | ||
38 | - ciphertext_len = encrypt (tmp, strlen(tmp), key, iv_buf, | ||
39 | + ciphertext_len = osslencrypt (tmp, strlen(tmp), key, iv_buf, | ||
40 | ciphertext); | ||
41 | printf("Calling mangle with len %d\n", ciphertext_len); | ||
42 | if (!ciphertext_len) | ||
diff --git a/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch b/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch new file mode 100644 index 0000000000..93103ef79f --- /dev/null +++ b/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From dab16a5fd4efde8ef569b358e19b1fcbc7d0d938 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Mon, 30 Mar 2020 00:10:46 +0200 | ||
4 | Subject: [PATCH] rngd_jitter: disambiguate call to encrypt | ||
5 | |||
6 | Commit 0f184ea7e792427fb20afe81d471b565aee96f0b disambiguate the call to | ||
7 | encrypt in rngd_rdrand.c but did not update rngd_jitter.c. | ||
8 | |||
9 | This raise the following build failure: | ||
10 | |||
11 | rngd_jitter.c:75:12: error: conflicting types for 'encrypt' | ||
12 | static int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, | ||
13 | ^~~~~~~ | ||
14 | In file included from rngd_jitter.c:27: | ||
15 | /home/dawncrow/buildroot-test/scripts/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/unistd.h:1132:13: note: previous declaration of 'encrypt' was here | ||
16 | extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1)); | ||
17 | ^~~~~~~ | ||
18 | Makefile:770: recipe for target 'rngd-rngd_jitter.o' failed | ||
19 | |||
20 | Fixes: | ||
21 | - http://autobuild.buildroot.org/results/0ca6bf16e3acbc94065b88c4442d6595424b77cb | ||
22 | |||
23 | Upstream-Status: Backport [https://github.com/nhorman/rng-tools/commit/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938] | ||
24 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
25 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
26 | --- | ||
27 | rngd_jitter.c | 4 ++-- | ||
28 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
29 | |||
30 | diff --git a/rngd_jitter.c b/rngd_jitter.c | ||
31 | index c1b1aca..49a3825 100644 | ||
32 | --- a/rngd_jitter.c | ||
33 | +++ b/rngd_jitter.c | ||
34 | @@ -72,7 +72,7 @@ unsigned char *aes_buf; | ||
35 | char key[AES_BLOCK]; | ||
36 | static unsigned char iv_buf[CHUNK_SIZE] __attribute__((aligned(128))); | ||
37 | |||
38 | -static int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, | ||
39 | +static int osslencrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, | ||
40 | unsigned char *iv, unsigned char *ciphertext) | ||
41 | { | ||
42 | EVP_CIPHER_CTX *ctx; | ||
43 | @@ -122,7 +122,7 @@ static inline int openssl_mangle(unsigned char *tmp, struct rng *ent_src) | ||
44 | unsigned char ciphertext[CHUNK_SIZE * RDRAND_ROUNDS]; | ||
45 | |||
46 | /* Encrypt the plaintext */ | ||
47 | - ciphertext_len = encrypt (tmp, strlen(tmp), key, iv_buf, | ||
48 | + ciphertext_len = osslencrypt (tmp, strlen(tmp), key, iv_buf, | ||
49 | ciphertext); | ||
50 | if (!ciphertext_len) | ||
51 | return -1; | ||