diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch | 83 |
1 files changed, 30 insertions, 53 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch index 93ce0343cc..0d3902f2a1 100644 --- a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch +++ b/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch | |||
@@ -6,16 +6,19 @@ Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13 | |||
6 | 6 | ||
7 | ported the patch to the 1.0.0e version | 7 | ported the patch to the 1.0.0e version |
8 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01 | 8 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01 |
9 | |||
10 | ported the patch to the 1.0.0m version | ||
11 | Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24 | ||
9 | Index: openssl-1.0.1e/Configure | 12 | Index: openssl-1.0.1e/Configure |
10 | =================================================================== | 13 | =================================================================== |
11 | --- openssl-1.0.1e.orig/Configure | 14 | --- openssl-1.0.1e.orig/Configure |
12 | +++ openssl-1.0.1e/Configure | 15 | +++ openssl-1.0.1e/Configure |
13 | @@ -402,6 +402,7 @@ my %table=( | 16 | @@ -402,6 +402,7 @@ my %table=( |
14 | "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | 17 | "linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
15 | "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | 18 | "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
16 | "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", | 19 | "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", |
17 | +"linux-x32", "gcc:-mx32 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", | 20 | +"linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", |
18 | "linux64-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", | 21 | "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", |
19 | #### So called "highgprs" target for z/Architecture CPUs | 22 | #### So called "highgprs" target for z/Architecture CPUs |
20 | # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see | 23 | # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see |
21 | Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | 24 | Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c |
@@ -26,65 +29,39 @@ Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | |||
26 | * machine. | 29 | * machine. |
27 | */ | 30 | */ |
28 | 31 | ||
29 | -#ifdef _WIN64 | 32 | -# ifdef _WIN64 |
30 | +#if defined _WIN64 || !defined __LP64__ | 33 | +# if defined _WIN64 || !defined __LP64__ |
31 | #define BN_ULONG unsigned long long | 34 | # define BN_ULONG unsigned long long |
32 | #else | 35 | # else |
33 | #define BN_ULONG unsigned long | 36 | # define BN_ULONG unsigned long |
34 | @@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con | ||
35 | asm ( | ||
36 | " subq %2,%2 \n" | ||
37 | ".p2align 4 \n" | ||
38 | - "1: movq (%4,%2,8),%0 \n" | ||
39 | - " adcq (%5,%2,8),%0 \n" | ||
40 | - " movq %0,(%3,%2,8) \n" | ||
41 | + "1: movq (%q4,%2,8),%0 \n" | ||
42 | + " adcq (%q5,%2,8),%0 \n" | ||
43 | + " movq %0,(%q3,%2,8) \n" | ||
44 | " leaq 1(%2),%2 \n" | ||
45 | " loop 1b \n" | ||
46 | " sbbq %0,%0 \n" | ||
47 | @@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con | ||
48 | asm ( | ||
49 | " subq %2,%2 \n" | ||
50 | ".p2align 4 \n" | ||
51 | - "1: movq (%4,%2,8),%0 \n" | ||
52 | - " sbbq (%5,%2,8),%0 \n" | ||
53 | - " movq %0,(%3,%2,8) \n" | ||
54 | + "1: movq (%q4,%2,8),%0 \n" | ||
55 | + " sbbq (%q5,%2,8),%0 \n" | ||
56 | + " movq %0,(%q3,%2,8) \n" | ||
57 | " leaq 1(%2),%2 \n" | ||
58 | " loop 1b \n" | ||
59 | " sbbq %0,%0 \n" | ||
60 | Index: openssl-1.0.1e/crypto/bn/bn.h | 37 | Index: openssl-1.0.1e/crypto/bn/bn.h |
61 | =================================================================== | 38 | =================================================================== |
62 | --- openssl-1.0.1e.orig/crypto/bn/bn.h | 39 | --- openssl-1.0.1e.orig/crypto/bn/bn.h |
63 | +++ openssl-1.0.1e/crypto/bn/bn.h | 40 | +++ openssl-1.0.1e/crypto/bn/bn.h |
64 | @@ -172,6 +172,13 @@ extern "C" { | 41 | @@ -173,6 +173,13 @@ extern "C" { |
42 | # endif | ||
65 | # endif | 43 | # endif |
66 | #endif | ||
67 | 44 | ||
68 | +/* Address type. */ | 45 | +/* Address type. */ |
69 | +#ifdef _WIN64 | 46 | +# ifdef _WIN64 |
70 | +#define BN_ADDR unsigned long long | 47 | +# define BN_ADDR unsigned long long |
71 | +#else | 48 | +# else |
72 | +#define BN_ADDR unsigned long | 49 | +# define BN_ADDR unsigned long |
73 | +#endif | 50 | +# endif |
74 | + | 51 | + |
75 | /* assuming long is 64bit - this is the DEC Alpha | 52 | /* |
76 | * unsigned long long is only 64 bits :-(, don't define | 53 | * assuming long is 64bit - this is the DEC Alpha unsigned long long is only |
77 | * BN_LLONG for the DEC Alpha */ | 54 | * 64 bits :-(, don't define BN_LLONG for the DEC Alpha |
78 | Index: openssl-1.0.1e/crypto/bn/bn_exp.c | 55 | Index: openssl-1.0.1e/crypto/bn/bn_exp.c |
79 | =================================================================== | 56 | =================================================================== |
80 | --- openssl-1.0.1e.orig/crypto/bn/bn_exp.c | 57 | --- openssl-1.0.1e.orig/crypto/bn/bn_exp.c |
81 | +++ openssl-1.0.1e/crypto/bn/bn_exp.c | 58 | +++ openssl-1.0.1e/crypto/bn/bn_exp.c |
82 | @@ -567,7 +567,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU | 59 | @@ -572,7 +572,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, |
83 | 60 | * multiple. | |
84 | /* Given a pointer value, compute the next address that is a cache line multiple. */ | 61 | */ |
85 | #define MOD_EXP_CTIME_ALIGN(x_) \ | 62 | #define MOD_EXP_CTIME_ALIGN(x_) \ |
86 | - ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) | 63 | - ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) |
87 | + ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) | 64 | + ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) |
88 | 65 | ||
89 | /* This variant of BN_mod_exp_mont() uses fixed windows and the special | 66 | /* |
90 | * precomputation memory layout to limit data-dependency to a minimum | 67 | * This variant of BN_mod_exp_mont() uses fixed windows and the special |