Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch for v252.4 #237

Merged
merged 15 commits into from
Dec 14, 2022
Merged

Batch for v252.4 #237

merged 15 commits into from
Dec 14, 2022

Conversation

keszybz
Copy link
Member

@keszybz keszybz commented Dec 14, 2022

No description provided.

yuwata and others added 15 commits December 14, 2022 17:06
If an attribute is read but the value is not used (i.e. ret_value is NULL),
then sd_device_get_sysattr_value() mistakenly frees the read data even though
it is cached internally.

Fixes a bug introduced by acfc2a1.

Fixes #25702.

(cherry picked from commit eb18e7b)
Fixes #25683.

(cherry picked from commit 494ef16)
- use SD_ID128_STRING_MAX or friend,
- use sizeof(sd_id128_t),
- use newly introduced ascii_ishex().

(cherry picked from commit 28bf2de)
…ontents is "uninitialized"

Then, this drops ID128_PLAIN_OR_UNINIT. Also, this renames
Id128Format -> Id128FormatFlag, and make it bitfield.

Fixes #25634.

(cherry picked from commit 057bf78)
We would execute up to four hwdb match patterns (+ the keyboard builtin):
After the first hit, we would skip the other patterns, because of the GOTO="evdev_end"
action.

57bb707 (rules: Add extended evdev/input match
rules for event nodes with the same name), added an additional match with
":phys:<phys>:ev:<ev>" inserted. This breaks backwards compatibility for user
hwdb patterns, because we quit after the first match.

In general hwdb properties are "additive". We often have a general rule that
matches a wider class and then some specific overrides. E.g. in this particular
case, we have a match for all trackpoints, and then a bunch of model-specific
settings.

So let's change the rules to try all the match patterns and combine the
received properties. We execute builtin-keyboard once at the end, if there was
at least one match.

Fixes #25698. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2152226.

This also impacts other cases which I think would be very confusing for users.
Since we quit after a first successful match, if we had e.g. a match for
'evdev:input:b*v*p*' in out database, and the user added a match using
'evdev:name:*', which is the approach we document in the .hwdb files and which
users quite often use, it would be silently ignored. What's worse, if we added
our 'evdev:input:b*v*p*' match at a later point, user's match would stop
working. If we combine all the properties, we get more stable behaviour.

(cherry picked from commit 953c928)
Let's enforce that callers pass AT_FDCWD as read_dfd to load_credential()
to avoid an assert() in read_full_file_full() if read_dfd is -1.

(cherry picked from commit 661e425)
In both cases, the json string is short, so we can print it, which is useful
for diagnosing invalid data in packages. But we need escape non-printable
characters.

https://bugzilla.redhat.com/show_bug.cgi?id=2152685

I went over the rest of the codebase, and it seems that other calls to
json_parse() don't have this problem.

(cherry picked from commit c5966ab)
I am now hitting the 500MB limit on Debian stable.

(cherry picked from commit de28dd7)
I am hitting the rate limit on a busy system with low resources, and
it stalls the boot process which is Very Bad (TM).

(cherry picked from commit 24a4542)

Included in the backport because it's a workaround for an issue introduced
in v249.
`FreezeUnit` can fail even when some units did got frozen, causing some
user units to be frozen. A possible symptom is `user@.service` being
frozen while still being able to log in over SSH.

(cherry picked from commit efa736d)
This ensures starting a new unit under a frozen slice work as expected.

(cherry picked from commit a14137d)
The `frozen` state can be `0` while the processes are indeed frozen (see
last commit). Therefore do not respect cgroup.events when checking
whether thawing is necessary.

(cherry picked from commit 7fcd269)
Sometimes a freeze operation can hang due to the presence of kernel
threads inside the unit cgroup (e.g. QEMU-KVM). This ensures that the
ThawUnit operation invoked by systemd-sleep at wakeup always thaws the
unit.

(cherry picked from commit 3d19e12)
@yuwata
Copy link
Member

yuwata commented Dec 14, 2022

dissect fix was already backported?
systemd/systemd#25591

@keszybz
Copy link
Member Author

keszybz commented Dec 14, 2022

mkosi / ci (debian, testing) is failling in repo config, not related.

@keszybz
Copy link
Member Author

keszybz commented Dec 14, 2022

dissect fix was already backported? systemd/systemd#25591

It was, and I made the comment, but then I dropped it because there was some issue, and then I added it back again. It'll be included.

@keszybz keszybz merged commit 14cff81 into systemd:v252-stable Dec 14, 2022
@keszybz keszybz deleted the v252-4-batch branch December 14, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants