diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-07-13 19:13:22 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-16 21:23:43 +0100 |
commit | a1ed2c1d8777a1e800e32715f8656fe8fcab7516 (patch) | |
tree | 34719bb9ca3c87aa8eb2b4d2ce2634493324d700 /meta/recipes-core | |
parent | cee5bfa1cf0b5c91c8102faadb3bd5d482f9ccef (diff) | |
download | poky-a1ed2c1d8777a1e800e32715f8656fe8fcab7516.tar.gz |
systemd: Fix libseccomp testcase involving __NR_ppoll
Some architectures may not have this syscall
(From OE-Core rev: 7eac0c1f59442532e39e0ec2ce031d9473925328)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch | 39 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_248.3.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch b/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch new file mode 100644 index 0000000000..0ba5fa2547 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 027ac2ad0695bb506460f9dd7e57149b71055887 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 8 Jun 2021 23:21:01 -0700 | ||
4 | Subject: [PATCH] test-seccomp: Check for __NR_ppoll before use | ||
5 | |||
6 | some newer architectures like riscv32 do not have __NR_ppoll from get go | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19858] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/test/test-seccomp.c | 5 +++-- | ||
12 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c | ||
15 | index b1f917eb54..daac0fcea8 100644 | ||
16 | --- a/src/test/test-seccomp.c | ||
17 | +++ b/src/test/test-seccomp.c | ||
18 | @@ -832,7 +832,7 @@ static void test_load_syscall_filter_set_raw(void) { | ||
19 | assert_se(s = hashmap_new(NULL)); | ||
20 | #if defined __NR_poll && __NR_poll >= 0 | ||
21 | assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(-1)) >= 0); | ||
22 | -#else | ||
23 | +#elif defined __NR_ppoll | ||
24 | assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0); | ||
25 | #endif | ||
26 | |||
27 | @@ -849,7 +849,8 @@ static void test_load_syscall_filter_set_raw(void) { | ||
28 | assert_se(s = hashmap_new(NULL)); | ||
29 | #if defined __NR_poll && __NR_poll >= 0 | ||
30 | assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(EILSEQ)) >= 0); | ||
31 | -#else | ||
32 | +#elif defined __NR_ppoll | ||
33 | + assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0); | ||
34 | assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(EILSEQ)) >= 0); | ||
35 | #endif | ||
36 | |||
37 | -- | ||
38 | 2.32.0 | ||
39 | |||
diff --git a/meta/recipes-core/systemd/systemd_248.3.bb b/meta/recipes-core/systemd/systemd_248.3.bb index 37607708f7..f5022a99c2 100644 --- a/meta/recipes-core/systemd/systemd_248.3.bb +++ b/meta/recipes-core/systemd/systemd_248.3.bb | |||
@@ -26,6 +26,7 @@ SRC_URI += " \ | |||
26 | file://0003-implment-systemd-sysv-install-for-OE.patch \ | 26 | file://0003-implment-systemd-sysv-install-for-OE.patch \ |
27 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ | 27 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ |
28 | file://0001-test-parse-argument-Include-signal.h.patch \ | 28 | file://0001-test-parse-argument-Include-signal.h.patch \ |
29 | file://0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch \ | ||
29 | " | 30 | " |
30 | 31 | ||
31 | # patches needed by musl | 32 | # patches needed by musl |