diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-10-15 05:49:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-15 17:55:09 +0100 |
commit | d54d049edaa5c91ce506c5d7f01bef3720c0077f (patch) | |
tree | 238fb56278a54a5c42483eddad6b53b7b13411ce /meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch | |
parent | b85fd33e7d54644f18b418a142bfd6b15e31d1c3 (diff) | |
download | poky-d54d049edaa5c91ce506c5d7f01bef3720c0077f.tar.gz |
openssl: Drop riscv32 upstreamed patches
These patches are already available in 3.0
(From OE-Core rev: 063d085534b7b3659c5721228bb58f4e8115b5ee)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch b/meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch deleted file mode 100644 index d62b9344c1..0000000000 --- a/meta/recipes-connectivity/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Thu, 29 Aug 2019 13:56:21 -0700 | ||
4 | Subject: [PATCH] Add support for io_pgetevents_time64 syscall | ||
5 | |||
6 | 32-bit architectures that are y2038 safe don't include syscalls that use | ||
7 | 32-bit time_t. Instead these architectures have suffixed syscalls that | ||
8 | always use a 64-bit time_t. In the case of the io_getevents syscall the | ||
9 | syscall has been replaced with the io_pgetevents_time64 syscall instead. | ||
10 | |||
11 | This patch changes the io_getevents() function to use the correct | ||
12 | syscall based on the avaliable syscalls and the time_t size. We will | ||
13 | only use the new 64-bit time_t syscall if the architecture is using a | ||
14 | 64-bit time_t. This is to avoid having to deal with 32/64-bit | ||
15 | conversions and relying on a 64-bit timespec struct on 32-bit time_t | ||
16 | platforms. As of Linux 5.3 there are no 32-bit time_t architectures | ||
17 | without __NR_io_getevents. In the future if a 32-bit time_t architecture | ||
18 | wants to use the 64-bit syscalls we can handle the conversion. | ||
19 | |||
20 | This fixes build failures on 32-bit RISC-V. | ||
21 | |||
22 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
23 | |||
24 | Reviewed-by: Richard Levitte <levitte@openssl.org> | ||
25 | Reviewed-by: Paul Dale <paul.dale@oracle.com> | ||
26 | (Merged from https://github.com/openssl/openssl/pull/9819) | ||
27 | Upstream-Status: Accepted | ||
28 | --- | ||
29 | engines/e_afalg.c | 16 ++++++++++++++++ | ||
30 | 1 file changed, 16 insertions(+) | ||
31 | |||
32 | diff --git a/engines/e_afalg.c b/engines/e_afalg.c | ||
33 | index dacbe358cb..99516cb1bb 100644 | ||
34 | --- a/engines/e_afalg.c | ||
35 | +++ b/engines/e_afalg.c | ||
36 | @@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, | ||
37 | struct io_event *events, | ||
38 | struct timespec *timeout) | ||
39 | { | ||
40 | +#if defined(__NR_io_getevents) | ||
41 | return syscall(__NR_io_getevents, ctx, min, max, events, timeout); | ||
42 | +#elif defined(__NR_io_pgetevents_time64) | ||
43 | + /* Let's only support the 64 suffix syscalls for 64-bit time_t. | ||
44 | + * This simplifies the code for us as we don't need to use a 64-bit | ||
45 | + * version of timespec with a 32-bit time_t and handle converting | ||
46 | + * between 64-bit and 32-bit times and check for overflows. | ||
47 | + */ | ||
48 | + if (sizeof(timeout->tv_sec) == 8) | ||
49 | + return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); | ||
50 | + else { | ||
51 | + errno = ENOSYS; | ||
52 | + return -1; | ||
53 | + } | ||
54 | +#else | ||
55 | +# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." | ||
56 | +#endif | ||
57 | } | ||
58 | |||
59 | static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, | ||
60 | -- | ||
61 | 2.30.1 | ||
62 | |||