mirror of
https://github.com/systemd/systemd
synced 2025-11-21 01:34:44 +01:00
Compare commits
No commits in common. "675fa49f69943b0f009c973ed3d1e90afc1d88b1" and "bb437748da02c43bda64ecaf980a5377825ec1a6" have entirely different histories.
675fa49f69
...
bb437748da
@ -825,9 +825,12 @@ mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:*
|
||||
# Nulea
|
||||
##########################################
|
||||
|
||||
# Note: The Nulea uses a generic USB dongle. Overriding its value would cause
|
||||
# other mice to be erroneously registered as trackballs, so only bluetooth
|
||||
# detection is added.
|
||||
# Note: it is possible that other devices may use the same wireless dongle,
|
||||
# as such this could require revisiting if it causes issues with other mice
|
||||
# Nulea M501 Wireless Trackball (USB Receiver)
|
||||
mouse:usb:v25a7pfa61:name:Compx 2.4G Receiver Mouse:*
|
||||
ID_INPUT_TRACKBALL=1
|
||||
|
||||
# Nulea M501 Wireless Trackball (Bluetooth)
|
||||
mouse:bluetooth:v000ep3412:name:Nulea BT5.0 Mouse:*
|
||||
ID_INPUT_TRACKBALL=1
|
||||
|
||||
@ -22,7 +22,6 @@ Packages=
|
||||
dbus-broker
|
||||
dbus-broker-units
|
||||
dhcp
|
||||
elfutils
|
||||
erofs-utils
|
||||
f2fs-tools
|
||||
git
|
||||
@ -40,7 +39,6 @@ Packages=
|
||||
openssl
|
||||
pacman
|
||||
perf
|
||||
pkgconf
|
||||
polkit
|
||||
procps-ng
|
||||
psmisc
|
||||
|
||||
@ -28,8 +28,6 @@ Packages=
|
||||
device-mapper-event
|
||||
device-mapper-multipath
|
||||
dfuzzer
|
||||
elfutils-devel
|
||||
elfutils-libs
|
||||
erofs-utils
|
||||
git-core
|
||||
glibc-langpack-de
|
||||
@ -51,7 +49,6 @@ Packages=
|
||||
pam
|
||||
passwd
|
||||
perf
|
||||
pkgconf
|
||||
policycoreutils
|
||||
polkit
|
||||
procps-ng
|
||||
|
||||
@ -53,8 +53,6 @@ Packages=
|
||||
isc-dhcp-server
|
||||
knot
|
||||
libcap-ng-utils
|
||||
libdw-dev
|
||||
libdw1
|
||||
locales
|
||||
login
|
||||
man-db
|
||||
@ -65,7 +63,6 @@ Packages=
|
||||
openssh-server
|
||||
passwd
|
||||
polkitd
|
||||
pkgconf
|
||||
procps
|
||||
psmisc
|
||||
python3-pexpect
|
||||
|
||||
@ -58,8 +58,6 @@ Packages=
|
||||
knot
|
||||
libapparmor1
|
||||
libcap-progs
|
||||
libdw-devel
|
||||
libdw1
|
||||
libtss2-tcti-device0
|
||||
man
|
||||
multipath-tools
|
||||
@ -70,7 +68,6 @@ Packages=
|
||||
pam
|
||||
patterns-base-minimal_base
|
||||
perf
|
||||
pkgconf
|
||||
procps4
|
||||
psmisc
|
||||
python3-pefile
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
FailureAction=exit
|
||||
@ -207,7 +207,7 @@ efi_c_ld_args = [
|
||||
]
|
||||
|
||||
linker_sanity_code = 'void a(void) {}; void _start(void) { a(); }'
|
||||
linker_sanity_args = ['-nostdlib', '-Wl,--fatal-warnings', '-fno-stack-protector']
|
||||
linker_sanity_args = ['-nostdlib', '-Wl,--fatal-warnings']
|
||||
|
||||
# Check if libgcc is available and then use it. It is needed for gcc builds
|
||||
# and for ia32 builds with clang.
|
||||
|
||||
@ -291,7 +291,7 @@ rmdir "$BOOT_ROOT/hoge"
|
||||
###########################################
|
||||
output="$("$kernel_install" -v --json=pretty inspect 1.1.1 "$D/sources/linux")"
|
||||
|
||||
diff -u <(echo "$output") - >&2 <<EOF
|
||||
diff -u <(echo "$output") - <<EOF
|
||||
{
|
||||
"MachineID" : "3e0484f3634a418b8e6a39e8828b03e3",
|
||||
"KernelImageType" : "unknown",
|
||||
@ -309,7 +309,7 @@ diff -u <(echo "$output") - >&2 <<EOF
|
||||
"$D/00-skip.install"
|
||||
],
|
||||
"PluginEnvironment" : [
|
||||
"LC_COLLATE=$SYSTEMD_DEFAULT_LOCALE",
|
||||
"LC_COLLATE=C.UTF-8",
|
||||
"KERNEL_INSTALL_VERBOSE=1",
|
||||
"KERNEL_INSTALL_IMAGE_TYPE=unknown",
|
||||
"KERNEL_INSTALL_MACHINE_ID=3e0484f3634a418b8e6a39e8828b03e3",
|
||||
|
||||
@ -132,7 +132,7 @@ _sd_const_ static __inline__ int sd_id128_is_allf(sd_id128_t a) {
|
||||
#define SD_ID128_NULL ((const sd_id128_t) { .qwords = { 0, 0 }})
|
||||
#define SD_ID128_ALLF ((const sd_id128_t) { .qwords = { UINT64_C(0xFFFFFFFFFFFFFFFF), UINT64_C(0xFFFFFFFFFFFFFFFF) }})
|
||||
|
||||
static __inline__ int sd_id128_in_setv(sd_id128_t a, va_list ap) {
|
||||
_sd_const_ static __inline__ int sd_id128_in_setv(sd_id128_t a, va_list ap) {
|
||||
for (;;) {
|
||||
sd_id128_t b = va_arg(ap, sd_id128_t);
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip()
|
||||
test_env = {
|
||||
'PATH' : meson.project_build_root() + ':' + path,
|
||||
'PROJECT_BUILD_ROOT' : meson.project_build_root(),
|
||||
'SYSTEMD_DEFAULT_LOCALE' : get_option('default-locale'),
|
||||
'SYSTEMD_SLOW_TESTS' : want_slow_tests ? '1' : '0',
|
||||
'PYTHONDONTWRITEBYTECODE' : '1',
|
||||
}
|
||||
@ -276,17 +275,6 @@ executables += [
|
||||
'sources' : files('test-compress.c'),
|
||||
'link_with' : [libshared],
|
||||
},
|
||||
test_template + {
|
||||
'sources' : files('test-coredump-stacktrace.c'),
|
||||
'type' : 'manual',
|
||||
# This test intentionally crashes with SIGSEGV by dereferencing a NULL pointer
|
||||
# to generate a coredump with a predictable stack trace. To prevent sanitizers
|
||||
# from catching the error first let's disable them explicitly, and also always
|
||||
# build with minimal optimizations to make the stack trace predictable no matter
|
||||
# what we build the rest of systemd with
|
||||
'override_options' : ['b_sanitize=none', 'strip=false', 'debug=true'],
|
||||
'c_args' : ['-fno-sanitize=all', '-fno-optimize-sibling-calls', '-O1'],
|
||||
},
|
||||
test_template + {
|
||||
'sources' : files('test-cryptolib.c'),
|
||||
'dependencies' : libopenssl,
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
/* This is a test program that intentionally segfaults so we can generate a
|
||||
* predictable-ish stack trace in tests. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
__attribute__((noinline))
|
||||
static void baz(int *x) {
|
||||
*x = rand();
|
||||
}
|
||||
|
||||
__attribute__((noinline))
|
||||
static void bar(void) {
|
||||
int * volatile x = NULL;
|
||||
|
||||
baz(x);
|
||||
}
|
||||
|
||||
__attribute__((noinline))
|
||||
static void foo(void) {
|
||||
bar();
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
foo();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -5,7 +5,7 @@ integration_tests += [
|
||||
integration_test_template + {
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
'storage': 'persistent',
|
||||
'coredump-exclude-regex' : '/(test-usr-dump|test-dump|test-stacktrace(-not)?-symbolized|bash)$',
|
||||
'coredump-exclude-regex' : '/(test-usr-dump|test-dump|bash)$',
|
||||
'vm' : true,
|
||||
'firmware' : 'auto',
|
||||
},
|
||||
|
||||
@ -8,13 +8,15 @@ set -o pipefail
|
||||
|
||||
# Make sure the binary name fits into 15 characters
|
||||
CORE_TEST_BIN="/tmp/test-dump"
|
||||
CORE_STACKTRACE_TEST_BIN="/tmp/test-stacktrace-dump"
|
||||
MAKE_STACKTRACE_DUMP="/tmp/make-stacktrace-dump"
|
||||
CORE_TEST_UNPRIV_BIN="/tmp/test-usr-dump"
|
||||
MAKE_DUMP_SCRIPT="/tmp/make-dump"
|
||||
# Unset $PAGER so we don't have to use --no-pager everywhere
|
||||
export PAGER=
|
||||
|
||||
at_exit() {
|
||||
rm -fv -- "$CORE_TEST_BIN" "$CORE_TEST_UNPRIV_BIN" "$MAKE_DUMP_SCRIPT"
|
||||
rm -fv -- "$CORE_TEST_BIN" "$CORE_TEST_UNPRIV_BIN" "$MAKE_DUMP_SCRIPT" "$MAKE_STACKTRACE_DUMP"
|
||||
}
|
||||
|
||||
(! systemd-detect-virt -cq)
|
||||
@ -249,70 +251,30 @@ systemd-run -t --property CoredumpFilter=default ls /tmp
|
||||
(! coredumpctl debug --debugger=/bin/true --debugger-arguments='"')
|
||||
|
||||
# Test for EnterNamespace= feature
|
||||
#
|
||||
if pkgconf --atleast-version 0.192 libdw ; then
|
||||
# dwfl_set_sysroot() is supported only in libdw-0.192 or newer.
|
||||
#
|
||||
# FIXME: drop the objdump call once https://github.com/systemd/systemd/pull/39268#issuecomment-3390745718 is
|
||||
# addressed
|
||||
if pkgconf --atleast-version 0.192 libdw &&
|
||||
objdump -h -j .gnu_debugdata -j .debug_info /usr/lib/systemd/tests/unit-tests/manual/test-coredump-stacktrace; then
|
||||
MAKE_STACKTRACE_DUMP="/tmp/make-stacktrace-dump"
|
||||
|
||||
# Simple script that mounts tmpfs on /tmp/ and copies the crashing test binary there, which in
|
||||
# combination with `unshare --mount` ensures the "outside" systemd-coredump process won't be able to
|
||||
# access the crashed binary (and hence won't be able to symbolize its stacktrace) unless
|
||||
# EnterNamespace=yes is used
|
||||
cat >"$MAKE_STACKTRACE_DUMP" <<\EOF
|
||||
#!/usr/bin/bash -eux
|
||||
|
||||
TARGET="/tmp/${1:?}"
|
||||
EC=0
|
||||
|
||||
# "Unhide" debuginfo in the namespace (see the comment below)
|
||||
test -d /usr/lib/debug/ && umount /usr/lib/debug/
|
||||
|
||||
mount -t tmpfs tmpfs /tmp/
|
||||
cp /usr/lib/systemd/tests/unit-tests/manual/test-coredump-stacktrace "$TARGET"
|
||||
|
||||
$TARGET || EC=$?
|
||||
if [[ $EC -ne 139 ]]; then
|
||||
echo >&2 "$TARGET didn't crash, this shouldn't happen"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
cat >"$MAKE_STACKTRACE_DUMP" <<END
|
||||
#!/usr/bin/env bash
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
gcc -xc -O0 -g -o $CORE_STACKTRACE_TEST_BIN - <<EOF
|
||||
void baz(void) { int *x = 0; *x = 42; }
|
||||
void bar(void) { baz(); }
|
||||
void foo(void) { bar(); }
|
||||
int main(void) { foo(); return 0;}
|
||||
EOF
|
||||
$CORE_STACKTRACE_TEST_BIN
|
||||
END
|
||||
chmod +x "$MAKE_STACKTRACE_DUMP"
|
||||
|
||||
# Since the test-coredump-stacktrace binary is built together with rest of the systemd its debug symbols
|
||||
# might be part of debuginfo packages (if supported & built), and libdw will then use them to symbolize
|
||||
# the stacktrace even if it doesn't have access to the original crashing binary. Let's make the test
|
||||
# simpler and just "hide" the debuginfo data, so libdw is forced to access the target namespace to get
|
||||
# the necessary symbols
|
||||
test -d /usr/lib/debug/ && mount -t tmpfs tmpfs /usr/lib/debug/
|
||||
|
||||
mkdir -p /run/systemd/coredump.conf.d/
|
||||
printf '[Coredump]\nEnterNamespace=no' >/run/systemd/coredump.conf.d/99-enter-namespace.conf
|
||||
|
||||
unshare --pid --fork --mount-proc --mount --uts --ipc --net "$MAKE_STACKTRACE_DUMP" "test-stacktrace-not-symbolized"
|
||||
timeout 30 bash -c "until coredumpctl list -q --no-legend /tmp/test-stacktrace-not-symbolized; do sleep .2; done"
|
||||
coredumpctl info /tmp/test-stacktrace-not-symbolized | tee /tmp/not-symbolized.log
|
||||
(! grep -E "#[0-9]+ .* main " /tmp/not-symbolized.log)
|
||||
(! grep -E "#[0-9]+ .* foo " /tmp/not-symbolized.log)
|
||||
(! grep -E "#[0-9]+ .* bar " /tmp/not-symbolized.log)
|
||||
(! grep -E "#[0-9]+ .* baz " /tmp/not-symbolized.log)
|
||||
unshare --pid --fork --mount-proc --mount --uts --ipc --net bash -c "$MAKE_STACKTRACE_DUMP" || :
|
||||
timeout 30 bash -c "until coredumpctl -1 info $CORE_STACKTRACE_TEST_BIN | grep -zvqE 'baz.*bar.*foo'; do sleep .2; done"
|
||||
|
||||
printf '[Coredump]\nEnterNamespace=yes' >/run/systemd/coredump.conf.d/99-enter-namespace.conf
|
||||
unshare --pid --fork --mount-proc --mount --uts --ipc --net "$MAKE_STACKTRACE_DUMP" "test-stacktrace-symbolized"
|
||||
timeout 30 bash -c "until coredumpctl list -q --no-legend /tmp/test-stacktrace-symbolized; do sleep .2; done"
|
||||
coredumpctl info /tmp/test-stacktrace-symbolized | tee /tmp/symbolized.log
|
||||
grep -E "#[0-9]+ .* main " /tmp/symbolized.log
|
||||
grep -E "#[0-9]+ .* foo " /tmp/symbolized.log
|
||||
grep -E "#[0-9]+ .* bar " /tmp/symbolized.log
|
||||
grep -E "#[0-9]+ .* baz " /tmp/symbolized.log
|
||||
|
||||
test -d /usr/lib/debug/ && umount /usr/lib/debug/
|
||||
rm -f "$MAKE_STACKTRACE_DUMP" /run/systemd/coredump.conf.d/99-enter-namespace.conf /tmp/{not-,}symbolized.log
|
||||
unshare --pid --fork --mount-proc --mount --uts --ipc --net bash -c "$MAKE_STACKTRACE_DUMP" || :
|
||||
timeout 30 bash -c "until coredumpctl -1 info $CORE_STACKTRACE_TEST_BIN | grep -zqE 'baz.*bar.*foo'; do sleep .2; done"
|
||||
else
|
||||
echo "libdw doesn't not support setting sysroot, skipping EnterNamespace= test"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user