diff -Nru systemd-245.4/debian/changelog systemd-245.4/debian/changelog --- systemd-245.4/debian/changelog 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/changelog 2022-03-30 11:37:38.000000000 +0800 @@ -1,27 +1,9 @@ -systemd (245.4-4ubuntu3.16) focal; urgency=medium +systemd (245.4-4ubuntu3.17) focal; urgency=medium - [ Dan Streetman ] - * d/p/lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch: - Avoid journalctl segfault (LP: #1946388) + * Add mic mute key support for HP Elite x360 series. (LP: #1967038) + - debian/patches/hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch - [ Jeremy Szu ] - * Add a allowlist to unblock intel-hid on new HP machines (LP: #1955997) - Author: Jeremy Szu - File: debian/patches/lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch - https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=88a859eaddb6c9a611fcbc44edab441aef4c4355 - - [ Nick Rosbrook ] - * Prevent arguments from being overwritten with defaults at shutdown (LP: #1958284) - File: debian/patches/lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch - https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=e61052bd1f20bcc54e7417542c6d445cf5040f56 - - [ Lukas Märdian ] - * Fix deadlock between pid1 and dbus-daemon (LP: #1871538) - Author: Lukas Märdian - File: debian/patches/pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch - https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=e3aacfa26e3fc6df369e6f28e740389ae0020907 - - -- Nick Rosbrook Wed, 23 Mar 2022 09:29:33 -0400 + -- Andy Chi Wed, 30 Mar 2022 11:37:38 +0800 systemd (245.4-4ubuntu3.15) focal-security; urgency=medium diff -Nru systemd-245.4/debian/patches/hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch systemd-245.4/debian/patches/hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch --- systemd-245.4/debian/patches/hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch 1970-01-01 08:00:00.000000000 +0800 +++ systemd-245.4/debian/patches/hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch 2022-03-30 11:35:58.000000000 +0800 @@ -0,0 +1,26 @@ +From f09f6dc2c8f59b2b58159cc413b605a547c8646e Mon Sep 17 00:00:00 2001 +From: Andy Chi +Date: Tue, 29 Mar 2022 15:36:13 +0800 +Subject: [PATCH] hwdb: Add mic mute key mapping for HP Elite x360 + +On the new Elite x360 2 in 1 HP laptops, the microphone mute hotkey is "Fn+F8" and +the scancode for this hotkey is 0x81, but this scancode was mapped to +fn_esc in the HP generic keymap section. To fix this problem, we add +a machine specific keymap section to add the correct keymap rule. +--- + hwdb.d/60-keyboard.hwdb | 2 ++ + 1 file changed, 2 insertions(+) + +Index: systemd/hwdb.d/60-keyboard.hwdb +=================================================================== +--- systemd.orig/hwdb.d/60-keyboard.hwdb ++++ systemd/hwdb.d/60-keyboard.hwdb +@@ -595,6 +595,8 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett + # HP EliteBook + evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPEliteBook*:pvr* + evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBook*:pvr* ++# HP Elite x360 ++evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPElite*x360*:* + # HP Elite Dragonfly + evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteDragonfly*:pvr* + # HP ProBook 440 G2 diff -Nru systemd-245.4/debian/patches/lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch systemd-245.4/debian/patches/lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch --- systemd-245.4/debian/patches/lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/patches/lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,29 +0,0 @@ -From 2b6df46d21abe8a8b7481e420588a9a129699cf9 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 22 Apr 2020 19:48:48 +0200 -Subject: [PATCH] sd-journal: don't check namespaces if we have no namespace to - go by -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1946388 -Origin: upstream, https://github.com/systemd/systemd/commit/2b6df46d21abe8a8b7481e420588a9a129699cf9 - -Fixes: #15528 ---- - src/journal/sd-journal.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/src/journal/sd-journal.c -+++ b/src/journal/sd-journal.c -@@ -1626,9 +1626,10 @@ static int add_directory( - !((dirname && dirname_is_machine_id(dirname) > 0) || path_has_prefix(j, path, "/run"))) - return 0; - -- if (!(FLAGS_SET(j->flags, SD_JOURNAL_ALL_NAMESPACES) || -- dirname_has_namespace(dirname, j->namespace) > 0 || -- (FLAGS_SET(j->flags, SD_JOURNAL_INCLUDE_DEFAULT_NAMESPACE) && dirname_has_namespace(dirname, NULL) > 0))) -+ if (dirname && -+ (!(FLAGS_SET(j->flags, SD_JOURNAL_ALL_NAMESPACES) || -+ dirname_has_namespace(dirname, j->namespace) > 0 || -+ (FLAGS_SET(j->flags, SD_JOURNAL_INCLUDE_DEFAULT_NAMESPACE) && dirname_has_namespace(dirname, NULL) > 0)))) - return 0; - - r = directory_open(j, path, &d); diff -Nru systemd-245.4/debian/patches/lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch systemd-245.4/debian/patches/lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch --- systemd-245.4/debian/patches/lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/patches/lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,30 +0,0 @@ -From: Jeremy Szu -Date: Tue, 8 Feb 2022 17:22:15 +0100 -Subject: lp1955997: add a allowlist to unblock intel-hid on HP machines - -For LP: #1955997, HP retired hp-wireless since 2022 and also confirmed the -correct source should be intel-hid instead of atkbd. Upstream already unblock -intel-hid on HP machines but it's risky to backport to stable series because -of pre-2022 machines. -I propose to maintain a allowlist on focal. For jammy, please refer to -LP: #1955997 for more details ---- - hwdb.d/60-keyboard.hwdb | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb -index 22f06c5..3a9705b 100644 ---- a/hwdb.d/60-keyboard.hwdb -+++ b/hwdb.d/60-keyboard.hwdb -@@ -492,6 +492,11 @@ evdev:input:b0003v0458p0708* - evdev:name:Intel HID events:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr* - KEYBOARD_KEY_8=unknown # Use hp-wireless instead - -+# The allowlist to unblock intel-hid on HP machines. -+evdev:name:Intel HID events:dmi:bvn*:bvr*:bd*:svnHP*:pnHPZBookFury16inchG9MobileWorkstationPC:pvr* -+evdev:name:Intel HID events:dmi:bvn*:bvr*:bd*:svnHP*:pnHPZBookStudio16.0InchMobileWorkstationPC:pvr* -+ KEYBOARD_KEY_8=wlan -+ - evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*:pvr* - evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr* - KEYBOARD_KEY_81=fn_esc diff -Nru systemd-245.4/debian/patches/lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch systemd-245.4/debian/patches/lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch --- systemd-245.4/debian/patches/lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/patches/lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,48 +0,0 @@ -Description: core: move reset_arguments() to the end of main's finish -Origin: upstream, https://github.com/systemd/systemd/commit/7d9eea2bd3d4f83668c7a78754d201b22 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1958284 ---- -From: Anita Zhang -Date: Thu, 17 Sep 2020 01:49:17 -0700 -Subject: core: move reset_arguments() to the end of main's finish - -Fixes #16991 - -fb39af4ce42d7ef9af63009f271f404038703704 replaced `free_arguments()` with -`reset_arguments()`, which frees arg_* variables as before, but also resets all -of them to the default values. `reset_arguments()` was positioned -in such a way that it overrode some arg_* values still in use at shutdown. - -To avoid further unintentional resets, I moved `reset_arguments()` -right before the return, when nothing else will be using the arg_* variables. ---- - src/core/main.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/core/main.c b/src/core/main.c -index e32ed02..615949b 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -2717,7 +2717,6 @@ finish: - m = manager_free(m); - } - -- reset_arguments(); - mac_selinux_finish(); - - if (reexecute) -@@ -2744,6 +2743,7 @@ finish: - * in become_shutdown() so normally we cannot free them yet. */ - watchdog_free_device(); - arg_watchdog_device = mfree(arg_watchdog_device); -+ reset_arguments(); - return retval; - } - #endif -@@ -2769,5 +2769,6 @@ finish: - freeze_or_exit_or_reboot(); - } - -+ reset_arguments(); - return retval; - } diff -Nru systemd-245.4/debian/patches/pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch systemd-245.4/debian/patches/pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch --- systemd-245.4/debian/patches/pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/patches/pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,91 +0,0 @@ -From: Lennart Poettering -Date: Thu, 17 Feb 2022 14:49:54 +0100 -Subject: pid1: set SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - -There's currently a deadlock between PID 1 and dbus-daemon: in some -cases dbus-daemon will do NSS lookups (which are blocking) at the same -time PID 1 synchronously blocks on some call to dbus-daemon. Let's break -that by setting SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon, -which will disable synchronously blocking varlink calls from nss-systemd -to PID 1. - -In the long run we should fix this differently: remove all synchronous -calls to dbus-daemon from PID 1. This is not trivial however: so far we -had the rule that synchronous calls from PID 1 to the dbus broker are OK -as long as they only go to interfaces implemented by the broke itself -rather than services reachable through it. Given that the relationship -between PID 1 and dbus is kinda special anyway, this was considered -acceptable for the sake of simplicity, since we quite often need -metadata about bus peers from the broker, and the asynchronous logic -would substantially complicate even the simplest method handlers. - -This mostly reworks the existing code that sets SYSTEMD_NSS_BYPASS_BUS= -(which is a similar hack to deal with deadlocks between nss-systemd and -dbus-daemon itself) to set SYSTEMD_NSS_DYNAMIC_BYPASS=1 instead. No code -was checking SYSTEMD_NSS_BYPASS_BUS= anymore anyway, and it used to -solve a similar problem, hence it's an obvious piece of code to rework -like this. - -Issue originally tracked down by Lukas Märdian. This patch is inspired -and closely based on his patch: - - https://github.com/systemd/systemd/pull/22038 - -Fixes: #15316 -Co-authored-by: Lukas Märdian ---- - src/core/execute.c | 10 +++++----- - src/core/execute.h | 2 +- - src/core/service.c | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/core/execute.c b/src/core/execute.c -index ca40874..b8d1ae4 100644 ---- a/src/core/execute.c -+++ b/src/core/execute.c -@@ -1829,11 +1829,11 @@ static int build_environment( - our_env[n_env++] = x; - } - -- /* If this is D-Bus, tell the nss-systemd module, since it relies on being able to use D-Bus look up dynamic -- * users via PID 1, possibly dead-locking the dbus daemon. This way it will not use D-Bus to resolve names, but -- * check the database directly. */ -- if (p->flags & EXEC_NSS_BYPASS_BUS) { -- x = strdup("SYSTEMD_NSS_BYPASS_BUS=1"); -+ /* If this is D-Bus, tell the nss-systemd module, since it relies on being able to use blocking -+ * Varlink calls back to us for look up dynamic users in PID 1. Break the deadlock between D-Bus and -+ * PID 1 by disabling use of PID1' NSS interface for looking up dynamic users. */ -+ if (p->flags & EXEC_NSS_DYNAMIC_BYPASS) { -+ x = strdup("SYSTEMD_NSS_DYNAMIC_BYPASS=1"); - if (!x) - return -ENOMEM; - our_env[n_env++] = x; -diff --git a/src/core/execute.h b/src/core/execute.h -index 4c7a5b8..2a261f3 100644 ---- a/src/core/execute.h -+++ b/src/core/execute.h -@@ -348,7 +348,7 @@ typedef enum ExecFlags { - EXEC_APPLY_TTY_STDIN = 1 << 2, - EXEC_PASS_LOG_UNIT = 1 << 3, /* Whether to pass the unit name to the service's journal stream connection */ - EXEC_CHOWN_DIRECTORIES = 1 << 4, /* chown() the runtime/state/cache/log directories to the user we run as, under all conditions */ -- EXEC_NSS_BYPASS_BUS = 1 << 5, /* Set the SYSTEMD_NSS_BYPASS_BUS environment variable, to disable nss-systemd for dbus */ -+ EXEC_NSS_DYNAMIC_BYPASS = 1 << 5, /* Set the SYSTEMD_NSS_DYNAMIC_BYPASS environment variable, to disable nss-systemd blocking on PID 1, for use by dbus-daemon */ - EXEC_CGROUP_DELEGATE = 1 << 6, - EXEC_IS_CONTROL = 1 << 7, - EXEC_CONTROL_CGROUP = 1 << 8, /* Place the process not in the indicated cgroup but in a subcgroup '/.control', but only EXEC_CGROUP_DELEGATE and EXEC_IS_CONTROL is set, too */ -diff --git a/src/core/service.c b/src/core/service.c -index 7b90822..debd9d6 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -1569,7 +1569,7 @@ static int service_spawn( - return -ENOMEM; - - /* System D-Bus needs nss-systemd disabled, so that we don't deadlock */ -- SET_FLAG(exec_params.flags, EXEC_NSS_BYPASS_BUS, -+ SET_FLAG(exec_params.flags, EXEC_NSS_DYNAMIC_BYPASS, - MANAGER_IS_SYSTEM(UNIT(s)->manager) && unit_has_name(UNIT(s), SPECIAL_DBUS_SERVICE)); - - strv_free_and_replace(exec_params.environment, final_env); diff -Nru systemd-245.4/debian/patches/series systemd-245.4/debian/patches/series --- systemd-245.4/debian/patches/series 2022-03-23 21:29:33.000000000 +0800 +++ systemd-245.4/debian/patches/series 2022-03-30 11:34:53.000000000 +0800 @@ -169,7 +169,4 @@ CVE-2021-3997-1.patch CVE-2021-3997-2.patch CVE-2021-3997-3.patch -lp1946388-sd-journal-don-t-check-namespaces-if-we-have-no-name.patch -lp1955997-add-a-allowlist-to-unblock-intel-hid-on-HP-mach.patch -lp1958284-core-move-reset_arguments-to-the-end-of-main-s-finish.patch -pid1-set-SYSTEMD_NSS_DYNAMIC_BYPASS-1-env-var-for-dbus-da.patch +hwdb-Add-mic-mute-key-mapping-for-HP-Elite-x360.patch