Compare commits
16 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54dfd2376d | ||
|
|
4866d64405 | ||
|
|
de066f607f | ||
|
|
f83e12aa03 | ||
|
|
2f958e0537 | ||
|
|
c608d153c4 | ||
|
|
e8e687a51d | ||
|
|
b1442037aa | ||
|
|
22c4f572b4 | ||
|
|
835eeac58c | ||
|
|
1fdb10909e | ||
|
|
9741ae2ab8 | ||
|
|
05ce3560ea | ||
|
|
3d8b607209 | ||
|
|
7ec8ed014e | ||
|
|
593d1c3279 |
6 changed files with 394 additions and 11 deletions
|
|
@ -0,0 +1,63 @@
|
|||
From de646878d39a184d3e5ecac5e49fac63b5d27dbf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 20 Sep 2020 14:37:39 +0200
|
||||
Subject: [PATCH] Revert "hashmap: make sure to initialize shared hash key
|
||||
atomically"
|
||||
|
||||
This reverts commit df14a160095987140f4435412156a80ec628fd7c.
|
||||
---
|
||||
src/basic/hashmap.c | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c
|
||||
index 64fbad1969..3bd94a1320 100644
|
||||
--- a/src/basic/hashmap.c
|
||||
+++ b/src/basic/hashmap.c
|
||||
@@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include <errno.h>
|
||||
-#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -21,6 +20,7 @@
|
||||
#include "strv.h"
|
||||
|
||||
#if ENABLE_DEBUG_HASHMAP
|
||||
+#include <pthread.h>
|
||||
#include "list.h"
|
||||
#endif
|
||||
|
||||
@@ -195,6 +195,7 @@ assert_cc(DIRECT_BUCKETS(struct set_entry) < (1 << 3));
|
||||
* a handful of directly stored entries in a hashmap. When a hashmap
|
||||
* outgrows direct storage, it gets its own key for indirect storage. */
|
||||
static uint8_t shared_hash_key[HASH_KEY_SIZE];
|
||||
+static bool shared_hash_key_initialized;
|
||||
|
||||
/* Fields that all hashmap/set types must have */
|
||||
struct HashmapBase {
|
||||
@@ -770,10 +771,6 @@ static void reset_direct_storage(HashmapBase *h) {
|
||||
memset(p, DIB_RAW_INIT, sizeof(dib_raw_t) * hi->n_direct_buckets);
|
||||
}
|
||||
|
||||
-static void shared_hash_key_initialize(void) {
|
||||
- random_bytes(shared_hash_key, sizeof(shared_hash_key));
|
||||
-}
|
||||
-
|
||||
static struct HashmapBase *hashmap_base_new(const struct hash_ops *hash_ops, enum HashmapType type HASHMAP_DEBUG_PARAMS) {
|
||||
HashmapBase *h;
|
||||
const struct hashmap_type_info *hi = &hashmap_type_info[type];
|
||||
@@ -796,8 +793,10 @@ static struct HashmapBase *hashmap_base_new(const struct hash_ops *hash_ops, enu
|
||||
|
||||
reset_direct_storage(h);
|
||||
|
||||
- static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
- assert_se(pthread_once(&once, shared_hash_key_initialize) == 0);
|
||||
+ if (!shared_hash_key_initialized) {
|
||||
+ random_bytes(shared_hash_key, sizeof(shared_hash_key));
|
||||
+ shared_hash_key_initialized= true;
|
||||
+ }
|
||||
|
||||
#if ENABLE_DEBUG_HASHMAP
|
||||
h->debug.func = func;
|
||||
143
a0a1977d9a5dc28e6c1998d8d5cb712305bd0b50.patch
Normal file
143
a0a1977d9a5dc28e6c1998d8d5cb712305bd0b50.patch
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
From a0a1977d9a5dc28e6c1998d8d5cb712305bd0b50 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 14 Nov 2019 17:51:30 +0100
|
||||
Subject: [PATCH] seccomp: more comprehensive protection against libseccomp's
|
||||
__NR_xyz namespace invasion
|
||||
|
||||
A follow-up for 59b657296a2fe104f112b91bbf9301724067cc81, adding the
|
||||
same conditioning for all cases of our __NR_xyz use.
|
||||
|
||||
Fixes: #14031
|
||||
(cherry picked from commit 4df8fe8415eaf4abd5b93c3447452547c6ea9e5f)
|
||||
---
|
||||
src/basic/missing_syscall.h | 10 +++++-----
|
||||
src/test/test-seccomp.c | 19 ++++++++++---------
|
||||
2 files changed, 15 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
|
||||
index 6d9b12544d..1255d8b197 100644
|
||||
--- a/src/basic/missing_syscall.h
|
||||
+++ b/src/basic/missing_syscall.h
|
||||
@@ -274,7 +274,7 @@ static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, c
|
||||
|
||||
#if !HAVE_KCMP
|
||||
static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
|
||||
-# ifdef __NR_kcmp
|
||||
+# if defined __NR_kcmp && __NR_kcmp > 0
|
||||
return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
@@ -289,7 +289,7 @@ static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long i
|
||||
|
||||
#if !HAVE_KEYCTL
|
||||
static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) {
|
||||
-# ifdef __NR_keyctl
|
||||
+# if defined __NR_keyctl && __NR_keyctl > 0
|
||||
return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
@@ -300,7 +300,7 @@ static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg
|
||||
}
|
||||
|
||||
static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
|
||||
-# ifdef __NR_add_key
|
||||
+# if defined __NR_add_key && __NR_add_key > 0
|
||||
return syscall(__NR_add_key, type, description, payload, plen, ringid);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
@@ -311,7 +311,7 @@ static inline key_serial_t missing_add_key(const char *type, const char *descrip
|
||||
}
|
||||
|
||||
static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
|
||||
-# ifdef __NR_request_key
|
||||
+# if defined __NR_request_key && __NR_request_key > 0
|
||||
return syscall(__NR_request_key, type, description, callout_info, destringid);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
@@ -496,7 +496,7 @@ enum {
|
||||
static inline long missing_set_mempolicy(int mode, const unsigned long *nodemask,
|
||||
unsigned long maxnode) {
|
||||
long i;
|
||||
-# ifdef __NR_set_mempolicy
|
||||
+# if defined __NR_set_mempolicy && __NR_set_mempolicy > 0
|
||||
i = syscall(__NR_set_mempolicy, mode, nodemask, maxnode);
|
||||
# else
|
||||
errno = ENOSYS;
|
||||
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
|
||||
index a906070f9a..6dd98672b8 100644
|
||||
--- a/src/test/test-seccomp.c
|
||||
+++ b/src/test/test-seccomp.c
|
||||
@@ -28,7 +28,8 @@
|
||||
#include "tmpfile-util.h"
|
||||
#include "virt.h"
|
||||
|
||||
-#if SCMP_SYS(socket) < 0 || defined(__i386__) || defined(__s390x__) || defined(__s390__)
|
||||
+/* __NR_socket may be invalid due to libseccomp */
|
||||
+#if !defined(__NR_socket) || __NR_socket <= 0 || defined(__i386__) || defined(__s390x__) || defined(__s390__)
|
||||
/* On these archs, socket() is implemented via the socketcall() syscall multiplexer,
|
||||
* and we can't restrict it hence via seccomp. */
|
||||
# define SECCOMP_RESTRICT_ADDRESS_FAMILIES_BROKEN 1
|
||||
@@ -304,14 +305,14 @@ static void test_protect_sysctl(void) {
|
||||
assert_se(pid >= 0);
|
||||
|
||||
if (pid == 0) {
|
||||
-#if __NR__sysctl > 0
|
||||
+#if defined __NR__sysctl && __NR__sysctl > 0
|
||||
assert_se(syscall(__NR__sysctl, NULL) < 0);
|
||||
assert_se(errno == EFAULT);
|
||||
#endif
|
||||
|
||||
assert_se(seccomp_protect_sysctl() >= 0);
|
||||
|
||||
-#if __NR__sysctl > 0
|
||||
+#if defined __NR__sysctl && __NR__sysctl > 0
|
||||
assert_se(syscall(__NR__sysctl, 0, 0, 0) < 0);
|
||||
assert_se(errno == EPERM);
|
||||
#endif
|
||||
@@ -640,7 +641,7 @@ static void test_load_syscall_filter_set_raw(void) {
|
||||
assert_se(poll(NULL, 0, 0) == 0);
|
||||
|
||||
assert_se(s = hashmap_new(NULL));
|
||||
-#if SCMP_SYS(access) >= 0
|
||||
+#if defined __NR_access && __NR_access > 0
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_access + 1), INT_TO_PTR(-1)) >= 0);
|
||||
#else
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_faccessat + 1), INT_TO_PTR(-1)) >= 0);
|
||||
@@ -656,7 +657,7 @@ static void test_load_syscall_filter_set_raw(void) {
|
||||
s = hashmap_free(s);
|
||||
|
||||
assert_se(s = hashmap_new(NULL));
|
||||
-#if SCMP_SYS(access) >= 0
|
||||
+#if defined __NR_access && __NR_access > 0
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_access + 1), INT_TO_PTR(EILSEQ)) >= 0);
|
||||
#else
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_faccessat + 1), INT_TO_PTR(EILSEQ)) >= 0);
|
||||
@@ -672,7 +673,7 @@ static void test_load_syscall_filter_set_raw(void) {
|
||||
s = hashmap_free(s);
|
||||
|
||||
assert_se(s = hashmap_new(NULL));
|
||||
-#if SCMP_SYS(poll) >= 0
|
||||
+#if defined __NR_poll && __NR_poll > 0
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(-1)) >= 0);
|
||||
#else
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0);
|
||||
@@ -689,7 +690,7 @@ static void test_load_syscall_filter_set_raw(void) {
|
||||
s = hashmap_free(s);
|
||||
|
||||
assert_se(s = hashmap_new(NULL));
|
||||
-#if SCMP_SYS(poll) >= 0
|
||||
+#if defined __NR_poll && __NR_poll > 0
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(EILSEQ)) >= 0);
|
||||
#else
|
||||
assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(EILSEQ)) >= 0);
|
||||
@@ -767,8 +768,8 @@ static int real_open(const char *path, int flags, mode_t mode) {
|
||||
* testing purposes that calls the real syscall, on architectures where SYS_open is defined. On
|
||||
* other architectures, let's just fall back to the glibc call. */
|
||||
|
||||
-#ifdef SYS_open
|
||||
- return (int) syscall(SYS_open, path, flags, mode);
|
||||
+#if defined __NR_open && __NR_open > 0
|
||||
+ return (int) syscall(__NR_open, path, flags, mode);
|
||||
#else
|
||||
return open(path, flags, mode);
|
||||
#endif
|
||||
129
f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
Normal file
129
f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
From f58b96d3e8d1cb0dd3666bc74fa673918b586612 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 14 Sep 2020 17:58:03 +0200
|
||||
Subject: [PATCH] test-mountpointutil-util: do not assert in test_mnt_id()
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1803070
|
||||
|
||||
I *think* this a kernel bug: the mnt_id as listed in /proc/self/mountinfo is different
|
||||
than the one we get from /proc/self/fdinfo/. This only matters when both statx and
|
||||
name_to_handle_at are unavailable and we hit the fallback path that goes through fdinfo:
|
||||
|
||||
(gdb) !uname -r
|
||||
5.6.19-200.fc31.ppc64le
|
||||
|
||||
(gdb) !cat /proc/self/mountinfo
|
||||
697 664 253:0 /var/lib/mock/fedora-31-ppc64le/root / rw,relatime shared:298 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
698 697 253:0 /var/cache/mock/fedora-31-ppc64le/yum_cache /var/cache/yum rw,relatime shared:299 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
699 697 253:0 /var/cache/mock/fedora-31-ppc64le/dnf_cache /var/cache/dnf rw,relatime shared:300 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
700 697 0:32 /mock-selinux-plugin.7me9bfpi /proc/filesystems rw,nosuid,nodev shared:301 master:18 - tmpfs tmpfs rw,seclabel <==========================================================
|
||||
701 697 0:41 / /sys ro,nosuid,nodev,noexec,relatime shared:302 - sysfs sysfs ro,seclabel
|
||||
702 701 0:21 / /sys/fs/selinux ro,nosuid,nodev,noexec,relatime shared:306 master:8 - selinuxfs selinuxfs rw
|
||||
703 697 0:42 / /dev rw,nosuid shared:303 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
704 703 0:43 / /dev/shm rw,nosuid,nodev shared:304 - tmpfs tmpfs rw,seclabel
|
||||
705 703 0:45 / /dev/pts rw,nosuid,noexec,relatime shared:307 - devpts devpts rw,seclabel,gid=5,mode=620,ptmxmode=666
|
||||
706 703 0:6 /btrfs-control /dev/btrfs-control rw,nosuid shared:308 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
707 703 0:6 /loop-control /dev/loop-control rw,nosuid shared:309 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
708 703 0:6 /loop0 /dev/loop0 rw,nosuid shared:310 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
709 703 0:6 /loop1 /dev/loop1 rw,nosuid shared:311 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
710 703 0:6 /loop10 /dev/loop10 rw,nosuid shared:312 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
711 703 0:6 /loop11 /dev/loop11 rw,nosuid shared:313 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
712 703 0:6 /loop2 /dev/loop2 rw,nosuid shared:314 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
713 703 0:6 /loop3 /dev/loop3 rw,nosuid shared:315 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
714 703 0:6 /loop4 /dev/loop4 rw,nosuid shared:316 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
715 703 0:6 /loop5 /dev/loop5 rw,nosuid shared:317 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
716 703 0:6 /loop6 /dev/loop6 rw,nosuid shared:318 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
717 703 0:6 /loop7 /dev/loop7 rw,nosuid shared:319 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
718 703 0:6 /loop8 /dev/loop8 rw,nosuid shared:320 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
719 703 0:6 /loop9 /dev/loop9 rw,nosuid shared:321 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
720 697 0:44 / /run rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
721 720 0:25 /systemd/nspawn/propagate/9cc8a155d0244558b273f773d2b92142 /run/systemd/nspawn/incoming ro master:12 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
722 697 0:32 /mock-resolv.dvml91hp /etc/resolv.conf rw,nosuid,nodev shared:322 master:18 - tmpfs tmpfs rw,seclabel
|
||||
725 697 0:47 / /proc rw,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
603 725 0:47 /sys /proc/sys ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
604 725 0:44 /systemd/inaccessible/reg /proc/kallsyms ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
605 725 0:44 /systemd/inaccessible/reg /proc/kcore ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
606 725 0:44 /systemd/inaccessible/reg /proc/keys ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
607 725 0:44 /systemd/inaccessible/reg /proc/sysrq-trigger ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
608 725 0:44 /systemd/inaccessible/reg /proc/timer_list ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
609 725 0:47 /bus /proc/bus ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
610 725 0:47 /fs /proc/fs ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
611 725 0:47 /irq /proc/irq ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
612 725 0:47 /scsi /proc/scsi ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
613 703 0:46 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:324 - mqueue mqueue rw,seclabel
|
||||
614 701 0:26 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:325 - cgroup2 cgroup rw,seclabel,nsdelegate
|
||||
615 603 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
616 725 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
617 725 0:44 /.#proc-kmsg5b7a8bcfe6717139//deleted /proc/kmsg rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
|
||||
The test process does
|
||||
name_to_handle_at("/proc/filesystems") which returns -EOPNOTSUPP, and then
|
||||
openat(AT_FDCWD, "/proc/filesystems") which returns 4, and then
|
||||
read(open("/proc/self/fdinfo/4", ...)) which gives
|
||||
"pos:\t0\nflags:\t012100000\nmnt_id:\t725\n"
|
||||
|
||||
and the "725" is clearly inconsistent with "700" in /proc/self/mountinfo.
|
||||
|
||||
We could either drop the fallback path (and fail name_to_handle_at() is not
|
||||
avaliable) or ignore the error in the test. Not sure what is better. I think
|
||||
this issue only occurs sometimes and with older kernels, so probably continuing
|
||||
with the current flaky implementation is better than ripping out the fallback.
|
||||
|
||||
Another strace:
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/sys is 603", iov_len=27}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/sys is 603
|
||||
) = 28
|
||||
name_to_handle_at(AT_FDCWD, "/", {handle_bytes=128 => 12, handle_type=129, f_handle=0x52748401000000008b93e20d}, [697], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of / is 697", iov_len=19}, {iov_base="\n", iov_len=1}], 2mnt ids of / is 697
|
||||
) = 20
|
||||
name_to_handle_at(AT_FDCWD, "/proc/kcore", {handle_bytes=128 => 12, handle_type=1, f_handle=0x92ddcfcd2e802d0100000000}, [605], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/kcore is 605", iov_len=29}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/kcore is 605
|
||||
) = 30
|
||||
name_to_handle_at(AT_FDCWD, "/dev", {handle_bytes=128 => 12, handle_type=1, f_handle=0x8ae269160c802d0100000000}, [703], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /dev is 703", iov_len=22}, {iov_base="\n", iov_len=1}], 2mnt ids of /dev is 703
|
||||
) = 23
|
||||
name_to_handle_at(AT_FDCWD, "/proc/filesystems", {handle_bytes=128}, 0x7fffe36ddb84, 0) = -1 EOPNOTSUPP (Operation not supported)
|
||||
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 4</proc/filesystems>
|
||||
openat(AT_FDCWD, "/proc/self/fdinfo/4", O_RDONLY|O_CLOEXEC) = 5</proc/20/fdinfo/4>
|
||||
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
|
||||
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
|
||||
read(5</proc/20/fdinfo/4>, "pos:\t0\nflags:\t012100000\nmnt_id:\t725\n", 2048) = 36
|
||||
read(5</proc/20/fdinfo/4>, "", 1024) = 0
|
||||
close(5</proc/20/fdinfo/4>) = 0
|
||||
close(4</proc/filesystems>) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/filesystems are 700, 725", iov_len=41}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/filesystems are 700, 725
|
||||
) = 42
|
||||
writev(2</dev/pts/0>, [{iov_base="the other path for mnt id 725 is /proc", iov_len=38}, {iov_base="\n", iov_len=1}], 2the other path for mnt id 725 is /proc
|
||||
) = 39
|
||||
writev(2</dev/pts/0>, [{iov_base="Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.", iov_len=108}, {iov_base="\n", iov_len=1}], 2Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.
|
||||
) = 109
|
||||
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
|
||||
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
|
||||
getpid() = 20
|
||||
gettid() = 20
|
||||
tgkill(20, 20, SIGABRT) = 0
|
||||
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
|
||||
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=20, si_uid=0} ---
|
||||
+++ killed by SIGABRT (core dumped) +++
|
||||
---
|
||||
src/test/test-mountpoint-util.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c
|
||||
index 30b00ae4d8b..ffe5144b04a 100644
|
||||
--- a/src/test/test-mountpoint-util.c
|
||||
+++ b/src/test/test-mountpoint-util.c
|
||||
@@ -89,8 +89,12 @@ static void test_mnt_id(void) {
|
||||
/* The ids don't match? If so, then there are two mounts on the same path, let's check if
|
||||
* that's really the case */
|
||||
char *t = hashmap_get(h, INT_TO_PTR(mnt_id2));
|
||||
- log_debug("the other path for mnt id %i is %s\n", mnt_id2, t);
|
||||
- assert_se(path_equal(p, t));
|
||||
+ log_debug("Path for mnt id %i from /proc/self/mountinfo is %s\n", mnt_id2, t);
|
||||
+
|
||||
+ if (!path_equal(p, t))
|
||||
+ /* Apparent kernel bug in /proc/self/fdinfo */
|
||||
+ log_warning("Bad mount id given for %s: %d, should be %d",
|
||||
+ p, mnt_id2, mnt_id);
|
||||
}
|
||||
}
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (systemd-ef67743.tar.gz) = 9e905ef4f310f5cbd739f15d51e8c500b0e6ce2fbd2ad33b6568e06212ecfb5bba1347754c00b37d30a5b65cd2432d99aef87ebbafa1a94b4185d773f4ce4987
|
||||
SHA512 (systemd-243.9.tar.gz) = c005580a8a28b4085cf6ba155f18b66f95cf454b5dff244b22d2b8218bcbc71ef93301f885ed4fb80714961ea9cf97e94cf970164b0021dc85f2b30bb3735252
|
||||
|
|
|
|||
65
systemd.spec
65
systemd.spec
|
|
@ -1,4 +1,4 @@
|
|||
%global commit ef677436aa203c24816021dd698b57f219f0ff64
|
||||
#global commit ef677436aa203c24816021dd698b57f219f0ff64
|
||||
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
|
||||
|
||||
%global stable 1
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
Name: systemd
|
||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 243
|
||||
Release: 3%{?commit:.git%{shortcommit}}%{?dist}
|
||||
Version: 243.9
|
||||
Release: 1%{?commit:.git%{shortcommit}}%{?dist}
|
||||
# For a breakdown of the licensing, see README
|
||||
License: LGPLv2+ and MIT and GPLv2+
|
||||
Summary: System and Service Manager
|
||||
|
|
@ -26,8 +26,12 @@ Summary: System and Service Manager
|
|||
%if %{defined commit}
|
||||
Source0: https://github.com/systemd/systemd%{?stable:-stable}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
||||
%else
|
||||
%if 0%{stable}
|
||||
Source0: https://github.com/systemd/systemd-stable/archive/v%{github_version}/%{name}-%{github_version}.tar.gz
|
||||
%else
|
||||
Source0: https://github.com/systemd/systemd/archive/v%{github_version}/%{name}-%{github_version}.tar.gz
|
||||
%endif
|
||||
%endif
|
||||
# This file must be available before %%prep.
|
||||
# It is generated during systemd build and can be found in build/src/core/.
|
||||
Source1: triggers.systemd
|
||||
|
|
@ -53,12 +57,15 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[
|
|||
%endif
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828
|
||||
Patch0001: https://github.com/keszybz/systemd/commit/464a73411c13596a130a7a8f0ac00ca728e5f69e.patch
|
||||
Patch0001: use-bfq-scheduler.patch
|
||||
|
||||
Patch0002: 0002-Revert-units-set-NoNewPrivileges-for-all-long-runnin.patch
|
||||
Patch0900: 0002-Revert-units-set-NoNewPrivileges-for-all-long-runnin.patch
|
||||
|
||||
Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
|
||||
|
||||
Patch0009: https://github.com/systemd/systemd/pull/17050/commits/f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
|
||||
Patch0010: 0001-Revert-hashmap-make-sure-to-initialize-shared-hash-k.patch
|
||||
|
||||
%ifarch %{ix86} x86_64 aarch64
|
||||
%global have_gnu_efi 1
|
||||
%endif
|
||||
|
|
@ -194,8 +201,11 @@ Summary: Macros that define paths and scriptlets related to systemd
|
|||
BuildArch: noarch
|
||||
|
||||
%description rpm-macros
|
||||
Just the definitions of rpm macros. Use %%{?systemd_requires} in the
|
||||
binary packages that use any scriptlets from this package.
|
||||
Just the definitions of rpm macros.
|
||||
|
||||
See
|
||||
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
|
||||
for information how to use those macros.
|
||||
|
||||
%package devel
|
||||
Summary: Development headers for systemd
|
||||
|
|
@ -476,7 +486,7 @@ python3 %{SOURCE2} %buildroot <<EOF
|
|||
EOF
|
||||
|
||||
%check
|
||||
%ninja_test -C %{_vpath_builddir}
|
||||
meson test -C %{_vpath_builddir} -t 3
|
||||
|
||||
#############################################################################################
|
||||
|
||||
|
|
@ -699,6 +709,43 @@ fi
|
|||
%files tests -f .file-list-tests
|
||||
|
||||
%changelog
|
||||
* Sun Sep 20 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243.9-1
|
||||
- Latest upstream stable version: uid parsing CVE-2020-13776,
|
||||
fix build with µhttpd 0.9.71, smaller fixes for udevd, sd-boot, documentation,
|
||||
shell completions, systemd-dissect, systemd-nspawn, kernel-install, tests)
|
||||
(#1731557, #1876905, #1856273, #1878530)
|
||||
- Do not fail in test because of kernel bug (#1803070)
|
||||
|
||||
* Thu Mar 26 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243.8-1
|
||||
- Update to latest stable version
|
||||
- Modify the downstream udev rule to use bfq to only apply to disks (#1803500)
|
||||
- Strip BOOT_IMAGE= from the kernel command-line in kernel-install (#1716164)
|
||||
|
||||
* Mon Feb 10 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243.7-1
|
||||
- Do not time out when resuming from hibernation (#1705522)
|
||||
- Revert patch causing issue with usb hubs (#1800820)
|
||||
|
||||
* Wed Feb 5 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243.6-1
|
||||
- Pull in a bunch of bugfixes (#1774242, #1798414/CVE-2020-1712)
|
||||
- The hardware database is updated to v245-rc1
|
||||
|
||||
* Sun Dec 15 2019 <zbyszek@nano-f31> - 243.5-1
|
||||
- Latest bugfix release (systemd-networkd fixups, minor cleanups to
|
||||
documentation).
|
||||
- Fix systemd-udev timeout on startup or shutdown (#1782879)
|
||||
|
||||
* Tue Nov 19 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243.4
|
||||
- Latest bugfix release. Systemd-stable snapshots will now be numbered.
|
||||
- Fix broken PrivateDevices filter on big-endian, s390x in particular (#1769148)
|
||||
- systemd-modules-load.service should only warn, not fail, on error (#1254340)
|
||||
- Fix incorrect certificate validation with DNS over TLS (#1771725, #1771726,
|
||||
CVE-2018-21029)
|
||||
- Fix regression with crypttab keys with colons
|
||||
- Various memleaks and minor memory access issues, warning adjustments
|
||||
|
||||
* Fri Oct 18 2019 Adam Williamson <awilliam@redhat.com> - 243-4.gitef67743
|
||||
- Backport PR #13792 to fix nomodeset+BIOS CanGraphical bug (#1728240)
|
||||
|
||||
* Thu Oct 10 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 243-3.gitef67743
|
||||
- Various minor documentation and error message cleanups
|
||||
- Do not use cgroup v1 hierarchy in nspawn on groups v2 (#1756143)
|
||||
|
|
@ -730,7 +777,7 @@ fi
|
|||
- Update to latest pre-release. Fixes #1740113, #1717712.
|
||||
- The default scheduler for disks is set to BFQ (1738828)
|
||||
- The default cgroup hierarchy is set to unified (cgroups v2) (#1732114).
|
||||
Use systemd.unified-cgroup-hierachy=0 on the kernel command line to revert.
|
||||
Use systemd.unified-cgroup-hierarchy=0 on the kernel command line to revert.
|
||||
See https://fedoraproject.org/wiki/Changes/CGroupsV2.
|
||||
|
||||
* Wed Aug 07 2019 Adam Williamson <awilliam@redhat.com> - 243~rc1-2
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ new file mode 100644
|
|||
index 00000000000..480b941761f
|
||||
--- /dev/null
|
||||
+++ b/rules/60-block-scheduler.rules
|
||||
@@ -0,0 +1,5 @@
|
||||
@@ -0,0 +1,6 @@
|
||||
+# do not edit this file, it will be overwritten on update
|
||||
+
|
||||
+ACTION=="add", SUBSYSTEM=="block", \
|
||||
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
|
||||
+ ENV{DEVTYPE}=="disk", \
|
||||
+ ATTR{queue/scheduler}="bfq"
|
||||
diff --git a/rules/meson.build b/rules/meson.build
|
||||
index b6a32ba77e2..1da958b4d46 100644
|
||||
Loading…
Add table
Add a link
Reference in a new issue