]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agoFixes & improvments for using homed-luks on 4k disks (#35776)
Yu Watanabe [Tue, 17 Feb 2026 14:23:23 +0000 (23:23 +0900)] 
Fixes & improvments for using homed-luks on 4k disks (#35776)

Mostly consists of fixes to

- use the same sector_size as the fdisk context we are using, when
converting between sectors returned by libfdisk to bytes. Fixes #30394 ,
Fixes #30393
- Use the explicit sector size if specified in the home record when are
probing the image file using libblkid. Fixes #30393

Also contains some other improvements with using physical block devices.

- Automatically probe sector size of physical block device, if user does
not pass luks-sector-size explicitly.
- Assign partitions to 1 MiB boundaries, as it is the standard practice
followed by all tools, fdisk, gptfdisk, gnu parted etc.
- Avoid stacking of loop device on top of physical block device in
home_create_luks as it leads to degradation of discard operations, and
mkfs getting stuck.

3 months agoSensor cleanup 1st pass (#40675)
Yu Watanabe [Tue, 17 Feb 2026 13:20:38 +0000 (22:20 +0900)] 
Sensor cleanup 1st pass (#40675)

This is a general cleanup of the sensors hwdb file divides into several
commits per brand.

I have merged the devices that use the same matrices, clean up a little
some clear dmi matches, and apply a inline comment with the device where
is certainly very clear way to display.

My idea is to do more cleanup steps but actually will require more
effort to achieve complete dmis, I can do it with little time, and some
consensus for comment styling.

About the comment styling actually I thing we could follow two rules at
the same time: inline comment when the dmi match is short and there is
no additional many information than just the model, and the other one
comment above the dmi match when is too long or there are need to add
more info.

3 months agoUse sectorsize for partition tables on block devs 35776/head
scarlet-storm [Sat, 28 Dec 2024 08:44:11 +0000 (14:14 +0530)] 
Use sectorsize for partition tables on block devs

Fix for specific case #30393 where 4k sector luks container is created
on a 512b device. In this case the partition table needs to be 512b,
else the kernel will not be able to find the partition, and we will
have to create a loop device to translate the partition table to 4k.

3 months agohomework: Ensure we don't stack block devices
scarlet-storm [Sat, 28 Dec 2024 07:55:25 +0000 (13:25 +0530)] 
homework: Ensure we don't stack block devices

Ensure we don't create a loop device on top of a physical block device.
This leads to huge performance degradation of discard operations if the
physical device does not support discard_on_zeroes.

- loop device historical semantics dictates that when the device is
  discarded, it needs to return zero data on read. This can be
  implemented easily on a filesystem. since fallocate zero-range
  would return immediately & the holes are handled at the filesystem
  level to return zero data on read.
- For a raw block device, the feature (discard_zeroes_data) depends on
  the capabilities of the physical device that is exposed to the
  block layer by the driver. This means that to guarantee that the loop
  device stacked on a block device returns zero on discarded data,
  it needs to convert discarded range into write_zero op on the block device.
  https://github.com/torvalds/linux/blob/63676eefb7a026d04b51dcb7aaf54f358517a2ec/drivers/block/loop.c#L773

For example on one of my local nvme I can see the following:
cat /sys/class/block/nvme1n1/queue/write_zeroes_max_bytes
131072
cat /sys/class/block/nvme0n1/queue/discard_max_hw_bytes
2199023255040

This means maximum size of a write_zero operation can be 128KiB &
maximum size of discard operation can be 2TiB on the block device.
So discarding for example 1TB of data, which would be a single block
device operation, gets split into 8.3 million block device operations
when issued on top of stacked loop device.

3 months agohomework: Use same sector size when probing the device
scarlet-storm [Sat, 28 Dec 2024 03:43:34 +0000 (09:13 +0530)] 
homework: Use same sector size when probing the device

If there is an explicit sector size specified in the user record,
use the same when probing the file using libblkid. The default
is 512 bytes, which will not be able to find the signatures, if the
partition table on regular file was created assuming 4k sectors

3 months agohomework: Align partitions to 1MiB
scarlet-storm [Fri, 27 Dec 2024 16:04:36 +0000 (21:34 +0530)] 
homework: Align partitions to 1MiB

Align partitions to 1MiB for consistency with regular partition tools
which use 1MiB alignment by default

3 months agohomework: Auto-probe luks sector size
scarlet-storm [Fri, 27 Dec 2024 11:49:34 +0000 (17:19 +0530)] 
homework: Auto-probe luks sector size

Auto-probe the luks sector size, if not explicitly
specified in the home record

3 months agohomework: Remove zeroing of PMBR
scarlet-storm [Fri, 27 Dec 2024 10:26:12 +0000 (15:56 +0530)] 
homework: Remove zeroing of PMBR

Remove zeroing of PMBR before writing out the new partition table.
There is no reason, to do this explicitly ?

3 months agohomework: Use same sector size as fdisk context
scarlet-storm [Fri, 27 Dec 2024 07:22:02 +0000 (12:52 +0530)] 
homework: Use same sector size as fdisk context

Ensure we use the same sector size as used in the created
fdisk context when converting between sectors and bytes.

3 months agohwdb: sensor: unknown add colon to sensor match 40675/head
David Santamaría Rogado [Tue, 17 Feb 2026 03:17:41 +0000 (04:17 +0100)] 
hwdb: sensor: unknown add colon to sensor match

3 months agohwdb: sensor: yours add comment
David Santamaría Rogado [Tue, 17 Feb 2026 03:11:59 +0000 (04:11 +0100)] 
hwdb: sensor: yours add comment

3 months agohwdb: sensor: wortmann in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 03:09:08 +0000 (04:09 +0100)] 
hwdb: sensor: wortmann in-line comment

3 months agohwdb: sensor: voyo fix dmi match format
David Santamaría Rogado [Tue, 17 Feb 2026 03:06:31 +0000 (04:06 +0100)] 
hwdb: sensor: voyo fix dmi match format

3 months agohwdb: sensor: trekstor in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 03:03:06 +0000 (04:03 +0100)] 
hwdb: sensor: trekstor in-line comment

3 months agohwdb: sensor: toshiba refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:43:14 +0000 (16:43 +0100)] 
hwdb: sensor: toshiba refactor

3 months agohwdb: sensor: thundersoft reformat dmi match
David Santamaría Rogado [Tue, 17 Feb 2026 02:07:58 +0000 (03:07 +0100)] 
hwdb: sensor: thundersoft reformat dmi match

3 months agohwdb: sensor: teclast refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:40:14 +0000 (16:40 +0100)] 
hwdb: sensor: teclast refactor

3 months agohwdb: sensor: schneider remove number part match
David Santamaría Rogado [Tue, 17 Feb 2026 01:59:16 +0000 (02:59 +0100)] 
hwdb: sensor: schneider remove number part match

Following Hans de Goede (jwrdegoede) way to match
BIOS versions, remove the last number part.

3 months agohwdb: sensor: rca in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 01:52:32 +0000 (02:52 +0100)] 
hwdb: sensor: rca in-line comment

3 months agohwdb: sensor: reeder in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 01:51:45 +0000 (02:51 +0100)] 
hwdb: sensor: reeder in-line comment

3 months agohwdb: sensor: purism in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 01:50:15 +0000 (02:50 +0100)] 
hwdb: sensor: purism in-line comment

3 months agohwdb: sensor: prowise add comment
David Santamaría Rogado [Tue, 17 Feb 2026 01:44:56 +0000 (02:44 +0100)] 
hwdb: sensor: prowise add comment

3 months agohwdb: sensor: predia reformat dmi match
David Santamaría Rogado [Tue, 17 Feb 2026 01:43:44 +0000 (02:43 +0100)] 
hwdb: sensor: predia reformat dmi match

3 months agohwdb: sensor: positivo simplify dmi matches
David Santamaría Rogado [Tue, 17 Feb 2026 01:34:28 +0000 (02:34 +0100)] 
hwdb: sensor: positivo simplify dmi matches

3 months agohwdb: sensor: point-of-view refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:33:44 +0000 (16:33 +0100)] 
hwdb: sensor: point-of-view refactor

3 months agohwdb: sensor: ployer in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:55:18 +0000 (01:55 +0100)] 
hwdb: sensor: ployer in-line comment

3 months agohwdb: sensor: pipo refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:32:46 +0000 (16:32 +0100)] 
hwdb: sensor: pipo refactor

3 months agohwdb: sensor: pine64 in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:51:52 +0000 (01:51 +0100)] 
hwdb: sensor: pine64 in-line comment

3 months agohwdb: sensor: peaq add comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:36:53 +0000 (01:36 +0100)] 
hwdb: sensor: peaq add comment

3 months agohwdb: sensor: passion in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:34:34 +0000 (01:34 +0100)] 
hwdb: sensor: passion in-line comment

3 months agohwdb: sensor: orangepi in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:32:54 +0000 (01:32 +0100)] 
hwdb: sensor: orangepi in-line comment

3 months agohwdb: sensor: one-netbook refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:31:55 +0000 (16:31 +0100)] 
hwdb: sensor: one-netbook refactor

3 months agohwdb: sensor: onda refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:31:03 +0000 (16:31 +0100)] 
hwdb: sensor: onda refactor

3 months agohwdb: sensor: odys add comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:21:13 +0000 (01:21 +0100)] 
hwdb: sensor: odys add comment

3 months agohwdb: sensor: nuvision refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:29:26 +0000 (16:29 +0100)] 
hwdb: sensor: nuvision refactor

3 months agohwdb: sensor: myria in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:14:43 +0000 (01:14 +0100)] 
hwdb: sensor: myria in-line comment

3 months agohwdb: sensor: msi add comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:13:44 +0000 (01:13 +0100)] 
hwdb: sensor: msi add comment

3 months agohwdb: sensor: mpman in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:12:44 +0000 (01:12 +0100)] 
hwdb: sensor: mpman in-line comment

3 months agohwdb: sensor: microtech in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:11:01 +0000 (01:11 +0100)] 
hwdb: sensor: microtech in-line comment

3 months agohwdb: sensor: metaphyuni in-line comment
David Santamaría Rogado [Tue, 17 Feb 2026 00:09:48 +0000 (01:09 +0100)] 
hwdb: sensor: metaphyuni in-line comment

3 months agohwdb: sensor: medion add fixme notes
David Santamaría Rogado [Fri, 13 Feb 2026 15:27:16 +0000 (16:27 +0100)] 
hwdb: sensor: medion add fixme notes

3 months agohwdb: sensor: mediacom in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 23:55:17 +0000 (00:55 +0100)] 
hwdb: sensor: mediacom in-line comment

3 months agohwdb: sensor: linx in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 23:52:36 +0000 (00:52 +0100)] 
hwdb: sensor: linx in-line comment

3 months agohwdb: sensor: lenovo refactor
David Santamaría Rogado [Fri, 13 Feb 2026 15:22:56 +0000 (16:22 +0100)] 
hwdb: sensor: lenovo refactor

when in a device is also needed to set the location haven't been merged
on purpose.

3 months agohwdb: sensor: lamina add comments
David Santamaría Rogado [Mon, 16 Feb 2026 23:34:37 +0000 (00:34 +0100)] 
hwdb: sensor: lamina add comments

3 months agohwdb: sensor: kd kurio add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 23:20:04 +0000 (00:20 +0100)] 
hwdb: sensor: kd kurio add in-line comment

3 months agohwdb: sensor: kazam add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 23:16:13 +0000 (00:16 +0100)] 
hwdb: sensor: kazam add in-line comment

3 months agohwdb: sensor: jumper prefer bios version over ct
David Santamaría Rogado [Fri, 13 Feb 2026 15:02:14 +0000 (16:02 +0100)] 
hwdb: sensor: jumper prefer bios version over ct

3 months agohwdb: sensor: irbis in-line comentting
David Santamaría Rogado [Fri, 13 Feb 2026 14:58:50 +0000 (15:58 +0100)] 
hwdb: sensor: irbis in-line comentting

3 months agohwdb: sensor: it-works refactor
David Santamaría Rogado [Fri, 13 Feb 2026 14:53:01 +0000 (15:53 +0100)] 
hwdb: sensor: it-works refactor

3 months agohwdb: sensor: iota 360 is the model
David Santamaría Rogado [Mon, 16 Feb 2026 23:02:55 +0000 (00:02 +0100)] 
hwdb: sensor: iota 360 is the model

3 months agohwdb: sensor: huawei add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 22:51:20 +0000 (23:51 +0100)] 
hwdb: sensor: huawei add in-line comment

3 months agohwdb: sensor: hp refactor
David Santamaría Rogado [Fri, 13 Feb 2026 14:17:28 +0000 (15:17 +0100)] 
hwdb: sensor: hp refactor

3 months agohwdb: sensor: hometech fix formatting
David Santamaría Rogado [Fri, 13 Feb 2026 14:08:00 +0000 (15:08 +0100)] 
hwdb: sensor: hometech fix formatting

3 months agohwdb: sensor: gpd refactor
David Santamaría Rogado [Fri, 13 Feb 2026 14:06:27 +0000 (15:06 +0100)] 
hwdb: sensor: gpd refactor

3 months agohwdb: sensor: gp add colon to sensor dmi
David Santamaría Rogado [Mon, 16 Feb 2026 21:30:38 +0000 (22:30 +0100)] 
hwdb: sensor: gp add colon to sensor dmi

3 months agohwdb: sensor: glavey add colon to sensor dmi
David Santamaría Rogado [Mon, 16 Feb 2026 21:29:00 +0000 (22:29 +0100)] 
hwdb: sensor: glavey add colon to sensor dmi

3 months agohwdb: sensor: geo add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 21:24:31 +0000 (22:24 +0100)] 
hwdb: sensor: geo add in-line comment

3 months agohwdb: sensor: exo add in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:53:10 +0000 (21:53 +0100)] 
hwdb: sensor: exo add in-line comment

3 months agohwdb: sensor: eve in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:46:40 +0000 (21:46 +0100)] 
hwdb: sensor: eve in-line comment

3 months agohwdb: sensor: estar add comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:32:19 +0000 (21:32 +0100)] 
hwdb: sensor: estar add comment

3 months agohwdb: sensor: endless add comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:21:56 +0000 (21:21 +0100)] 
hwdb: sensor: endless add comment

3 months agohwdb: sensor: digma in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:18:43 +0000 (21:18 +0100)] 
hwdb: sensor: digma in-line comment

3 months agohwdb: sensor: digibras in-line comment
David Santamaría Rogado [Mon, 16 Feb 2026 20:17:52 +0000 (21:17 +0100)] 
hwdb: sensor: digibras in-line comment

3 months agohwdb: sensor: dexp rework
David Santamaría Rogado [Mon, 16 Feb 2026 20:14:46 +0000 (21:14 +0100)] 
hwdb: sensor: dexp rework

3 months agohwdb: sensor: dere add comments
David Santamaría Rogado [Mon, 16 Feb 2026 19:59:03 +0000 (20:59 +0100)] 
hwdb: sensor: dere add comments

3 months agohwdb: sensor: dell rework
David Santamaría Rogado [Sun, 15 Feb 2026 09:28:57 +0000 (10:28 +0100)] 
hwdb: sensor: dell rework

Change Vostro5581 to use its sku to match the rest, I suppouse it was
added before we had sku in dmi modalias.

Fix OCB4 sku instead a begining O letter needs to be a beggining zero,
checked in original bug report.

Reorder entries.

Use proper formatting.

3 months agohwdb: sensor: cube refactor
David Santamaría Rogado [Fri, 13 Feb 2026 13:17:32 +0000 (14:17 +0100)] 
hwdb: sensor: cube refactor

3 months agohwdb: sensor: cytrix fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:53:25 +0000 (20:53 +0100)] 
hwdb: sensor: cytrix fix

3 months agohwdb: sensor: cyberbook add comment
David Santamaría Rogado [Mon, 16 Feb 2026 19:47:26 +0000 (20:47 +0100)] 
hwdb: sensor: cyberbook add comment

3 months agohwdb: sensor: csl fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:14:07 +0000 (20:14 +0100)] 
hwdb: sensor: csl fix

3 months agohwdb: sensor: connect fix
David Santamaría Rogado [Mon, 16 Feb 2026 19:13:45 +0000 (20:13 +0100)] 
hwdb: sensor: connect fix

3 months agohwdb: sensor: chuwi refactor
David Santamaría Rogado [Fri, 13 Feb 2026 13:07:38 +0000 (14:07 +0100)] 
hwdb: sensor: chuwi refactor

At least one too generic dmi string is there.

3 months agohwdb: sensor: bush minor changes
David Santamaría Rogado [Sun, 15 Feb 2026 08:58:58 +0000 (09:58 +0100)] 
hwdb: sensor: bush minor changes

3 months agohwdv: sensor: bmax add fixme notes
David Santamaría Rogado [Sun, 15 Feb 2026 08:47:14 +0000 (09:47 +0100)] 
hwdv: sensor: bmax add fixme notes

Comment that more research about the two accelerometer should be done.

3 months agohwdb: sensor: ayaneo refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 12:45:50 +0000 (13:45 +0100)] 
hwdb: sensor: ayaneo refactor and rework

This one is a real mess, spaces in dmi modalias, minus zeroes.

Needs a little more love.

fix whitespaces and comment in-line.

3 months agohwdb: sensor: axxo fix previous search and replace
David Santamaría Rogado [Fri, 13 Feb 2026 12:37:20 +0000 (13:37 +0100)] 
hwdb: sensor: axxo fix previous search and replace

3 months agohwdb: sensor: asus refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 12:34:00 +0000 (13:34 +0100)] 
hwdb: sensor: asus refactor and rework

For safety, prefer board product name, that always has the short name,
over system product name, that in few models has a very long string with
the short name at the end.

The following models added at the time of this commit BR1100FKA, RC72LA
and TP412UA needs a wildcard before when using pn.

Unmerged Q502LAB, Q551LB and Q551LN, in the merged match there are many
more unreported models.

Sort by the first model in every group.

3 months agohwdb: sensor: archos in-line commenting
David Santamaría Rogado [Sun, 15 Feb 2026 05:01:26 +0000 (06:01 +0100)] 
hwdb: sensor: archos in-line commenting

3 months agohwdb: sensor: aquarius rework
David Santamaría Rogado [Sun, 15 Feb 2026 04:55:01 +0000 (05:55 +0100)] 
hwdb: sensor: aquarius rework

3 months agohwdb: sensor: acer refactor and rework
David Santamaría Rogado [Fri, 13 Feb 2026 10:21:53 +0000 (11:21 +0100)] 
hwdb: sensor: acer refactor and rework

Rework acer matches to use system vendor with board name.

Is the most reliable way to deal with Acer.

While doing it discover that matches SP111-32N and SP111-34N broke in
c0443b97b7 (hwdb: add trailing ":*" everywhere, 2020-10-15)

Sort by the first model of every group.

3 months agohwdb: sensor: say that model sort is groupped
David Santamaría Rogado [Sun, 15 Feb 2026 04:06:03 +0000 (05:06 +0100)] 
hwdb: sensor: say that model sort is groupped

3 months agoUpdate hwdb and autosuspend rules (#40710)
Luca Boccassi [Tue, 17 Feb 2026 12:13:18 +0000 (12:13 +0000)] 
Update hwdb and autosuspend rules (#40710)

3 months agohwdb: update autosuspend rules 40710/head
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:51:58 +0000 (11:51 +0100)] 
hwdb: update autosuspend rules

3 months agohwdb: update
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:51:14 +0000 (11:51 +0100)] 
hwdb: update

As always, a spattering of additions and updates.

3 months agonspawn: Join network namespace with setns()
Daan De Meyer [Mon, 16 Feb 2026 21:12:34 +0000 (22:12 +0100)] 
nspawn: Join network namespace with setns()

We don't have /proc mounted which means namespace_enter() won't work
on older kernels, so use setns() instead.

3 months agomeson: update man rules
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 10:29:32 +0000 (11:29 +0100)] 
meson: update man rules

Why oh why do people forget to do this?
Fixup for 563b5dedb77affe619290d5eab34fe6b39d52915.

3 months agocore: add SetProperties varlink method (#40356)
Zbigniew Jędrzejewski-Szmek [Tue, 17 Feb 2026 09:57:09 +0000 (10:57 +0100)] 
core: add SetProperties varlink method (#40356)

Start with Markers as a property, more can be added in the future as
needed

3 months agoSeveral fixlets for issues found by Coverity (#40707)
Yu Watanabe [Tue, 17 Feb 2026 09:26:46 +0000 (18:26 +0900)] 
Several fixlets for issues found by Coverity (#40707)

3 months agooomd: Fix unnecessary delays during OOM kills with pending kills present
Chris Down [Tue, 17 Feb 2026 06:58:44 +0000 (14:58 +0800)] 
oomd: Fix unnecessary delays during OOM kills with pending kills present

Let's say a user has two services with ManagedOOMMemoryPressure=kill,
perhaps a web server under system.slice and a batch job under
user.slice. Both exceed their pressure limits. On the previous timer
tick, oomd has already queued the web server's candidate for killing,
but the prekill hook has not yet responded, so the kill is still
pending.

In the code, monitor_memory_pressure_contexts_handler() iterates over
all pressure targets that have exceeded their limits. When it reaches
the web server target and calls oomd_cgroup_kill_mark(), which returns 0
because that cgroup is already queued. The code treats this the same as
a successful new kill: it resets the 15 second delay timer and returns
from the function, exiting the loop.

This loop is handled by SET_FOREACH and the iteration order is
hash-dependent. As such, if the web server target happens coincidentally
to be visited first, oomd never evaluates the batch job target at all.

The effect is twofold:

1. oomd stalls for 15 seconds despite not having initiated any new kill.
   That can unnecessarily delay further action to stem increases in
   memory pressure. The delay exists to let stale pressure counters
   settle after a kill, but no kill has happened here.
2. It non-deterministically skips pressure targets that may have
   unqueued candidates, dangerously allowing memory pressure to persist
   for longer than it should.

Fix this by skipping cgroups that are already queued so the loop
proceeds to try other pressure targets. We should only delay when a new
kill mark is actually created.

3 months agooomd: Fix silent failure to find bad cgroups when another cgroup dies
Chris Down [Tue, 17 Feb 2026 06:30:16 +0000 (14:30 +0800)] 
oomd: Fix silent failure to find bad cgroups when another cgroup dies

Consider a workload slice with several sibling cgroups. Imagine that one
of those cgroups is removed between the moment oomd enumerates the
directory and the moment it reads memory.oom.group. This is actually
relatively plausible under the high memory pressure conditions where
oomd is most needed.

In this case, the failed read prompts us to `return 0`, which exits the
entire enumeration loop in recursively_get_cgroup_context(). As a
result, all remaining sibling cgroups are silently dropped from the
candidate list for that monitoring cycle.

The effect is that oomd can fail to identify and kill the actual
offending cgroup, allowing memory pressure to persist until a subsequent
cycle where the race doesn't occur.

Fix this by instead proceeding to evaluate further sibling cgroups.

3 months agooomd: Fix silent, non-deterministic dropped OOM kills
Chris Down [Tue, 17 Feb 2026 05:46:49 +0000 (13:46 +0800)] 
oomd: Fix silent, non-deterministic dropped OOM kills

Let's say a user has two services with ManagedOOMMemoryPressure=kill,
one for a web server under system.slice, and one for a batch job under
user.slice. The batch job is causing severe memory pressure, whereas the
web server's cgroup has no processes with significant pgscan activity.

In the code, monitor_memory_pressure_contexts_handler() iterates over
all pressure targets that have exceeded their limits. When
oomd_select_by_pgscan_rate() returns 0 (that is, no candidates) for a
target, we return from the entire SET_FOREACH loop instead of moving to
the next target. Since SET_FOREACH iteration order is hash-dependent, if
the web server target happens to be visited first, oomd will find no
kill candidates for it and exit the loop. The batch job target that is
actually slamming the machine will never even be evaluated, and can
continue to wreak havoc without any intervention.

The effect is that oomd non-deterministically and silently fails to kill
cgroups that it should actually kill, allowing memory pressure to
persist and dangerously build up on the machine.

The fix is simple, keep evaluating remaining targets when one does not
match.

3 months agonetwork/wwan: fix memleak in failure path 40707/head
Yu Watanabe [Tue, 17 Feb 2026 08:02:05 +0000 (17:02 +0900)] 
network/wwan: fix memleak in failure path

Fixes CID#1645018.

3 months agonetwork/wwan: add missing error check
Yu Watanabe [Tue, 17 Feb 2026 07:50:48 +0000 (16:50 +0900)] 
network/wwan: add missing error check

Fixes CID#1645015.

3 months agosd-bus: use bus_error_message() at several more places
Yu Watanabe [Tue, 17 Feb 2026 07:44:36 +0000 (16:44 +0900)] 
sd-bus: use bus_error_message() at several more places

For CID#1645014, CID#1645016, and CID#1645017.

3 months agobus-polkit: add one more assertion
Yu Watanabe [Tue, 17 Feb 2026 07:39:35 +0000 (16:39 +0900)] 
bus-polkit: add one more assertion

For CID#1645013.

3 months agosocket-util: remove unused {send,receive}_many_fds*()
Mike Yuan [Sun, 15 Jun 2025 19:35:36 +0000 (21:35 +0200)] 
socket-util: remove unused {send,receive}_many_fds*()

These were introduced as part of the effort of sd-executor
worker pool (#29566), which never landed due to unsignificant
performance improvement. Let's just remove the unused
helpers. If that work ever gets resurrected they can be
restored from this commit pretty easily.

3 months agooomd: Fix Killed signal reason being lost (#40689)
Yu Watanabe [Tue, 17 Feb 2026 05:53:46 +0000 (14:53 +0900)] 
oomd: Fix Killed signal reason being lost (#40689)

Emitting "oom" doesn't mesh with the org.freedesktop.oom1.Manager
Killed() API contract, which defines "memory-used" and "memory-pressure"
as possible reasons. Consumers that key off reason thus will either lose
policy attribution or may reject the unknown value completely.

Plumb the reason through so it is visible to consumers.

3 months agooomd: Add regression tests to check Killed notification gives a reason 40689/head
Chris Down [Sun, 15 Feb 2026 16:25:31 +0000 (00:25 +0800)] 
oomd: Add regression tests to check Killed notification gives a reason

3 months agooomd: Fix Killed signal reason being lost
Chris Down [Sun, 15 Feb 2026 17:42:51 +0000 (01:42 +0800)] 
oomd: Fix Killed signal reason being lost

Emitting "oom" doesn't mesh with the org.freedesktop.oom1.Manager
Killed() API contract, which defines "memory-used" and "memory-pressure"
as possible reasons. Consumers that key off reason thus will either lose
policy attribution or may reject the unknown value completely.

Plumb the reason through so it is visible to consumers.