systemd-257-11
Resolves: RHEL-79976,RHEL-86713,RHEL-87179
This commit is contained in:
parent
2df2d42a0b
commit
57499b79dc
55
0350-fuzz-journal-remote-use-ASSERT_OK-and-friends.patch
Normal file
55
0350-fuzz-journal-remote-use-ASSERT_OK-and-friends.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 19eadc77d4b941ae8918fca88a44ecd0876537ff Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Sat, 28 Dec 2024 14:17:47 +0900
|
||||
Subject: [PATCH] fuzz-journal-remote: use ASSERT_OK() and friends
|
||||
|
||||
(cherry picked from commit 27c992dd9fa7f69779adc85607523a1e52296af0)
|
||||
|
||||
Related: RHEL-79976
|
||||
---
|
||||
src/journal-remote/fuzz-journal-remote.c | 15 +++++----------
|
||||
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/journal-remote/fuzz-journal-remote.c b/src/journal-remote/fuzz-journal-remote.c
|
||||
index 774389dee3..2427c739b8 100644
|
||||
--- a/src/journal-remote/fuzz-journal-remote.c
|
||||
+++ b/src/journal-remote/fuzz-journal-remote.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "path-util.h"
|
||||
#include "rm-rf.h"
|
||||
#include "strv.h"
|
||||
+#include "tests.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
@@ -54,14 +55,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
return r;
|
||||
}
|
||||
|
||||
- r = journal_remote_add_source(&s, fdin, (char*) "fuzz-data", false);
|
||||
- if (r < 0)
|
||||
- return r;
|
||||
+ ASSERT_OK_POSITIVE(journal_remote_add_source(&s, fdin, (char*) "fuzz-data", false));
|
||||
TAKE_FD(fdin_close);
|
||||
- assert(r > 0);
|
||||
|
||||
while (s.active)
|
||||
- assert_se(journal_remote_handle_raw_source(NULL, fdin, 0, &s) >= 0);
|
||||
+ ASSERT_OK(journal_remote_handle_raw_source(NULL, fdin, 0, &s));
|
||||
|
||||
assert_se(close(fdin) < 0 && errno == EBADF); /* Check that the fd is closed already */
|
||||
|
||||
@@ -84,11 +82,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
for (OutputMode mode = 0; mode < _OUTPUT_MODE_MAX; mode++) {
|
||||
if (!dev_null)
|
||||
log_info("/* %s */", output_mode_to_string(mode));
|
||||
- r = show_journal(dev_null ?: stdout, j, mode, 0, 0, -1, 0, NULL);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
- r = sd_journal_seek_head(j);
|
||||
- assert_se(r >= 0);
|
||||
+ ASSERT_OK(show_journal(dev_null ?: stdout, j, mode, 0, 0, -1, 0, NULL));
|
||||
+ ASSERT_OK(sd_journal_seek_head(j));
|
||||
}
|
||||
|
||||
return 0;
|
@ -0,0 +1,76 @@
|
||||
From 93fa6d7512c97c87ae9023c3f4a7825865c70c1a Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Sat, 28 Dec 2024 14:09:22 +0900
|
||||
Subject: [PATCH] logs-show: skip journal entry with an invalid timestamp
|
||||
|
||||
Follow-up for 275e6be052e690adcad5d2a557acb9dcb5bedbc6.
|
||||
Fixes oss-fuzz#385221809 (https://issues.oss-fuzz.com/issues/385221809).
|
||||
Fixes #35737.
|
||||
|
||||
(cherry picked from commit f19f640513cf3ededdf1f5cc6f00efca27efc61f)
|
||||
|
||||
Related: RHEL-79976
|
||||
---
|
||||
src/shared/logs-show.c | 9 +++++----
|
||||
.../fuzz/fuzz-journal-remote/oss-fuzz-385221809 | Bin 0 -> 10595 bytes
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
create mode 100644 test/fuzz/fuzz-journal-remote/oss-fuzz-385221809
|
||||
|
||||
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
|
||||
index 2289b83a15..3f3f4e628d 100644
|
||||
--- a/src/shared/logs-show.c
|
||||
+++ b/src/shared/logs-show.c
|
||||
@@ -335,7 +335,7 @@ static int output_timestamp_monotonic(
|
||||
assert(previous_boot_id);
|
||||
|
||||
if (!VALID_MONOTONIC(display_ts->monotonic))
|
||||
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No valid monotonic timestamp available");
|
||||
+ return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "No valid monotonic timestamp available, skipping showing journal entry.");
|
||||
|
||||
written_chars += fprintf(f, "[%5"PRI_USEC".%06"PRI_USEC, display_ts->monotonic / USEC_PER_SEC, display_ts->monotonic % USEC_PER_SEC);
|
||||
|
||||
@@ -375,15 +375,14 @@ static int output_timestamp_realtime(
|
||||
assert(j);
|
||||
|
||||
if (!VALID_REALTIME(usec))
|
||||
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No valid realtime timestamp available.");
|
||||
+ return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "No valid realtime timestamp available, skipping showing journal entry.");
|
||||
|
||||
switch (mode) {
|
||||
|
||||
case OUTPUT_SHORT_FULL:
|
||||
case OUTPUT_WITH_UNIT: {
|
||||
if (!format_timestamp_style(buf, sizeof(buf), usec, flags & OUTPUT_UTC ? TIMESTAMP_UTC : TIMESTAMP_PRETTY))
|
||||
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
- "Failed to format timestamp: %" PRIu64, usec);
|
||||
+ return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to format timestamp (%"PRIu64"), skipping showing journal entry.", usec);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -623,6 +622,8 @@ static int output_short(
|
||||
parse_display_realtime(j, realtime, monotonic, &usec);
|
||||
r = output_timestamp_realtime(f, j, mode, flags, usec);
|
||||
}
|
||||
+ if (r == -EINVAL)
|
||||
+ return 0;
|
||||
if (r < 0)
|
||||
return r;
|
||||
n += r;
|
||||
diff --git a/test/fuzz/fuzz-journal-remote/oss-fuzz-385221809 b/test/fuzz/fuzz-journal-remote/oss-fuzz-385221809
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8bb473ac56adb97962da8894c0ca5bf70cd8c437
|
||||
GIT binary patch
|
||||
literal 10595
|
||||
zcmeI2zfQw25XLk60eFs!ojCRop;97Li8NIbkU*6zkjTW$2&`FnhQ0s`6JlWGJ^Cgn
|
||||
zZD{@wk`$$=3HKX3Sf}%McebaGDCIk&({SQCDp`VX<j!mzbfQ8P&TJs+$n!!qIkqFg
|
||||
z1p`Jw3T}dw*HL7dQru93S<#i$3DF5rfp_MQovNgaxK0p^P8@sQBJj2pxOo09bGwX9
|
||||
zM^krZ8yk&jBa$}Qkq`ikQT`{DH|b0U)EAw<na~~5PfDK%-Mppj4*@U$bVx8)>k3^^
|
||||
z!Gs0EB;>=^H0@E-h*GXM^+Int8Rvc`#(@e;TA&Ngr6scq288spZOD)~A5t+$6>%KL
|
||||
zRr?5nAcJB#sA~GgL*E2%!Q~dQ2!bF8f*=TjAP9o&KL`6Sv19H#&W9j-M!kzCv8e3c
|
||||
zCe+3(lX(Q%7?0Xy{IcKt=ym!J#W(u6^o;?e-1ozx-7Fo@MIobK;Y+KW<eb&o&hjb>
|
||||
z2UK~~^1;Qd)sl-%*oEYxiju`9*AHkL*g9iJfd+YbOCMFeMuSR2a?7A!ud8ud-Ivd^
|
||||
dD@#q2klLoMFU$LDPN(B2f4O){t%_?e<R?)ghLr#S
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 854df7cf5a1d4a69f348fe3cc58cf905693aada7 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 13:49:51 +0200
|
||||
Subject: [PATCH] man: mention that rhel-9.0 net naming scheme is the same as
|
||||
v251
|
||||
|
||||
Due to the rebase in 9.2 it is a bit confusing that we are documenting
|
||||
the newer upstream scheme and it might look 9.0 is based in v255.
|
||||
So let's explicitly mention that the scheme is the same as in v251.
|
||||
|
||||
Resolves: RHEL-87179
|
||||
|
||||
rhel-only: doc
|
||||
---
|
||||
man/systemd.net-naming-scheme.xml | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml
|
||||
index 0b0bbbb2f1..d2dc5fe7bb 100644
|
||||
--- a/man/systemd.net-naming-scheme.xml
|
||||
+++ b/man/systemd.net-naming-scheme.xml
|
||||
@@ -568,7 +568,8 @@
|
||||
<varlistentry>
|
||||
<term><constant>rhel-9.0</constant></term>
|
||||
|
||||
- <listitem><para>Since version <constant>v247</constant> we no longer set
|
||||
+ <listitem><para>Same as naming scheme <constant>v251</constant>.</para>
|
||||
+ <para>Since version <constant>v247</constant> we no longer set
|
||||
<varname>ID_NET_NAME_SLOT</varname> if we detect that a PCI device associated with a slot is a PCI
|
||||
bridge as that would create naming conflict when there are more child devices on that bridge. Now,
|
||||
this is relaxed and we will use slot information to generate the name based on it but only if
|
80
0353-backlight-Drop-support-for-actual_brightness.patch
Normal file
80
0353-backlight-Drop-support-for-actual_brightness.patch
Normal file
@ -0,0 +1,80 @@
|
||||
From 1df2bb0f638dcb518575ae67dcd809670ed52639 Mon Sep 17 00:00:00 2001
|
||||
From: Mario Limonciello <mario.limonciello@amd.com>
|
||||
Date: Fri, 28 Mar 2025 09:19:23 -0500
|
||||
Subject: [PATCH] backlight: Drop support for actual_brightness
|
||||
|
||||
Some AMD systems have support for features like custom brightness
|
||||
curve or adaptive backlight management. These features allow the
|
||||
display driver to adjust the brightness based upon other factors
|
||||
than just the user brightness request.
|
||||
|
||||
The user's brightness request is indicated in the 'brightness' file
|
||||
but the effective result of the logic in the display driver is stored
|
||||
in the 'actual_brightness' file.
|
||||
|
||||
This leads to problems when shutting the system down because the value
|
||||
of 'actual_brightness' may be lower than 'brightness' and the wrong value
|
||||
gets stored for the next boot.
|
||||
|
||||
For example if the brightness a user requested was 150, the actual_brightness
|
||||
might be 130. So the next boot the brightness will be "set" to 130, but the
|
||||
actual brightness might be 115. If the user reboots again it will be set to 115
|
||||
for the next boot but the actual brightness might be 100. That is this gets worse
|
||||
and worse each reboot cycle until the system eventually boots up at minimum
|
||||
brightness.
|
||||
|
||||
Furthermore the kernel documentation indicates that the brightness and
|
||||
actual_brightness files are not guaranteed to be the same values.
|
||||
|
||||
Due to this; drop the use of 'actual_brightness' when saving/restoring brightness
|
||||
and instead rely only upon 'brightness'.
|
||||
|
||||
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
(cherry picked from commit 9a224c307b36610e3675390eb2620e74d0f4efb0)
|
||||
|
||||
Resolves: RHEL-86713
|
||||
---
|
||||
src/backlight/backlight.c | 29 -----------------------------
|
||||
1 file changed, 29 deletions(-)
|
||||
|
||||
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
|
||||
index 2de6c2008a..018cd35321 100644
|
||||
--- a/src/backlight/backlight.c
|
||||
+++ b/src/backlight/backlight.c
|
||||
@@ -408,35 +408,6 @@ static int read_brightness(sd_device *device, unsigned max_brightness, unsigned
|
||||
assert(device);
|
||||
assert(ret_brightness);
|
||||
|
||||
- if (device_in_subsystem(device, "backlight")) {
|
||||
- r = sd_device_get_sysattr_value(device, "actual_brightness", &value);
|
||||
- if (r == -ENOENT) {
|
||||
- log_device_debug_errno(device, r, "Failed to read 'actual_brightness' attribute, "
|
||||
- "fall back to use 'brightness' attribute: %m");
|
||||
- goto use_brightness;
|
||||
- }
|
||||
- if (r < 0)
|
||||
- return log_device_debug_errno(device, r, "Failed to read 'actual_brightness' attribute: %m");
|
||||
-
|
||||
- r = safe_atou(value, &brightness);
|
||||
- if (r < 0) {
|
||||
- log_device_debug_errno(device, r, "Failed to parse 'actual_brightness' attribute, "
|
||||
- "fall back to use 'brightness' attribute: %s", value);
|
||||
- goto use_brightness;
|
||||
- }
|
||||
-
|
||||
- if (brightness > max_brightness) {
|
||||
- log_device_debug(device, "actual_brightness=%u is larger than max_brightness=%u, "
|
||||
- "fall back to use 'brightness' attribute", brightness, max_brightness);
|
||||
- goto use_brightness;
|
||||
- }
|
||||
-
|
||||
- log_device_debug(device, "Current actual_brightness is %u", brightness);
|
||||
- *ret_brightness = brightness;
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
-use_brightness:
|
||||
r = sd_device_get_sysattr_value(device, "brightness", &value);
|
||||
if (r < 0)
|
||||
return log_device_debug_errno(device, r, "Failed to read 'brightness' attribute: %m");
|
12
systemd.spec
12
systemd.spec
@ -48,7 +48,7 @@ Url: https://systemd.io
|
||||
# Allow users to specify the version and release when building the rpm by
|
||||
# setting the %%version_override and %%release_override macros.
|
||||
Version: %{?version_override}%{!?version_override:257}
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
|
||||
%global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)
|
||||
|
||||
@ -459,6 +459,10 @@ Patch0346: 0346-bash-completion-udevadm-verify-suggest-found-udev-ru.patch
|
||||
Patch0347: 0347-udevadm-introduce-cat-command.patch
|
||||
Patch0348: 0348-resolved-pick-up-new-DNSSEC-KSC-from-2024.patch
|
||||
Patch0349: 0349-test_ukify-Skip-on-riscv64.patch
|
||||
Patch0350: 0350-fuzz-journal-remote-use-ASSERT_OK-and-friends.patch
|
||||
Patch0351: 0351-logs-show-skip-journal-entry-with-an-invalid-timesta.patch
|
||||
Patch0352: 0352-man-mention-that-rhel-9.0-net-naming-scheme-is-the-s.patch
|
||||
Patch0353: 0353-backlight-Drop-support-for-actual_brightness.patch
|
||||
|
||||
# Downstream-only patches (9000–9999)
|
||||
%endif
|
||||
@ -1405,6 +1409,12 @@ rm -f .file-list-*
|
||||
rm -f %{name}.lang
|
||||
|
||||
%changelog
|
||||
* Tue Apr 15 2025 systemd maintenance team <systemd-maint@redhat.com> - 257-11
|
||||
- fuzz-journal-remote: use ASSERT_OK() and friends (RHEL-79976)
|
||||
- logs-show: skip journal entry with an invalid timestamp (RHEL-79976)
|
||||
- man: mention that rhel-9.0 net naming scheme is the same as v251 (RHEL-87179)
|
||||
- backlight: Drop support for actual_brightness (RHEL-86713)
|
||||
|
||||
* Fri Apr 11 2025 systemd maintenance team <systemd-maint@redhat.com> - 257-10
|
||||
- resolved: pick up new DNSSEC KSC from 2024 (RHEL-77718)
|
||||
- test_ukify: Skip on riscv64 (RHEL-85854)
|
||||
|
Loading…
Reference in New Issue
Block a user