summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make fopen_temporary and fopen_temporary_label unlockedZbigniew Jędrzejewski-Szmek2019-04-1221-45/+31
| | | | | | | | This is partially a refactoring, but also makes many more places use unlocked operations implicitly, i.e. all users of fopen_temporary(). AFAICT, the uses are always for short-lived files which are not shared externally, and are just used within the same context. Locking is not necessary.
* Add fopen_unlocked() wrapperZbigniew Jędrzejewski-Szmek2019-04-128-86/+108
|
* Merge pull request #12267 from keszybz/udev-settle-warningLennart Poettering2019-04-115-2/+121
|\ | | | | Udev settle warning
| * systemd-udev-settle.service: emit deprecation noticeZbigniew Jędrzejewski-Szmek2019-04-101-1/+64
| |
| * man: add a page for systemd-udev-settle.serviceZbigniew Jędrzejewski-Szmek2019-04-104-1/+57
| |
* | tree-wide: drop several missing_*.h and import relevant headers from kernel-5.0Yu Watanabe2019-04-1167-2347/+10771
| |
* | Merge pull request #12153 from benjarobin/killall-show-not-killedLennart Poettering2019-04-113-20/+115
|\ \ | | | | | | shutdown/killall: Show in the console the processes not yet killed
| * | core/killall: Add documentation about broadcast_signal()Benjamin Robin2019-04-101-0/+6
| | |
| * | core/killall: Log the process names not killed after 10sBenjamin Robin2019-04-101-3/+37
| | |
| * | shutdown: Bump sysctl kernel.printk log level in order to see info msgBenjamin Robin2019-04-101-0/+47
| | |
| * | core/killall: Propagate errors and return the number of process leftBenjamin Robin2019-04-082-17/+25
| | |
* | | Merge pull request #12226 from poettering/22bit-pidsLennart Poettering2019-04-112-2/+4
|\ \ \ | | | | | | | | sysctl: let's by default increase the numeric PID range from 2^16 to …
| * | | sysctl: let's by default increase the numeric PID range from 2^16 to 2^22Lennart Poettering2019-04-092-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should PID collisions a tiny bit less likely, and thus improve security and robustness. 2^22 isn't particularly a lot either, but it's the current kernel limitation. Bumping this limit was suggested by Linus himself: https://lwn.net/ml/linux-kernel/CAHk-=wiZ40LVjnXSi9iHLE_-ZBsWFGCgdmNiYZUXn1-V5YBg2g@mail.gmail.com/ Let's experiment with this in systemd upstream first. Downstreams and users can after all still comment this easily. Besides compat concern the most often heard issue with such high PIDs is usability, since they are potentially hard to type. I am not entirely sure though whether 4194304 (as largest new PID) is that much worse to type or to copy than 65563. This should also simplify management of per system tasks limits as by this move the sysctl /proc/sys/kernel/threads-max becomes the primary knob to control how many processes to have in parallel.
* | | | Merge pull request #12037 from poettering/oom-stateLennart Poettering2019-04-1125-57/+528
|\ \ \ \ | | | | | | | | | | add cgroupv2 oom killer event handling to service management
| * | | | update TODOLennart Poettering2019-04-091-4/+0
| | | | |
| * | | | test: add test case for new OOM logicLennart Poettering2019-04-093-0/+92
| | | | |
| * | | | man: document new OOMPolicy= settingLennart Poettering2019-04-093-5/+45
| | | | |
| * | | | catalog: add a new catalog entry explaining the new OOM killer event log msgLennart Poettering2019-04-091-0/+13
| | | | |
| * | | | core: implement OOMPolicy= and watch cgroups for OOM killingsLennart Poettering2019-04-0917-12/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new per-service OOMPolicy= (along with a global DefaultOOMPolicy=) that controls what to do if a process of the service is killed by the kernel's OOM killer. It has three different values: "continue" (old behaviour), "stop" (terminate the service), "kill" (let the kernel kill all the service's processes). On top of that, track OOM killer events per unit: generate a per-unit structured, recognizable log message when we see an OOM killer event, and put the service in a failure state if an OOM killer event was seen and the selected policy was not "continue". A new "result" is defined for this case: "oom-kill". All of this relies on new cgroupv2 kernel functionality: the "memory.events" notification interface and the "memory.oom.group" attribute (which makes the kernel kill all cgroup processes automatically).
| * | | | service: beautify debug log message a bitLennart Poettering2019-04-091-1/+1
| | | | |
| * | | | core: rename cgroup_inotify_wd → cgroup_control_inotify_wdLennart Poettering2019-04-094-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's rename the .cgroup_inotify_wd field of the Unit object to .cgroup_control_inotify_wd. Let's similarly rename the hashmap .cgroup_inotify_wd_unit of the Manager object to .cgroup_control_inotify_wd_unit. Why? As preparation for a later commit that allows us to watch the "memory.events" cgroup attribute file in addition to the "cgroup.events" file we already watch with the fields above. In that later commit we'll add new fields "cgroup_memory_inotify_wd" to Unit and "cgroup_memory_inotify_wd_unit" to Manager, that are used to watch these other events file. No change in behaviour. Just some renaming.
| * | | | core: check for redundant operation before doing allocationLennart Poettering2019-04-091-6/+4
| | | | |
| * | | | core: rearrange cgroup empty events a bitLennart Poettering2019-04-092-8/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the priorities for cgroup empty event handling were pretty weird. The raw events (on cgroupsv2 from inotify, on cgroupsv1 from the agent dgram socket) where scheduled at a lower priority than the cgroup empty queue dispatcher. Let's swap that and ensure that we can coalesce events more agressively: let's process the raw events at higher priority than the cgroup empty event (which remains at the same prio).
* | | | Merge pull request #12219 from keszybz/bootctl-check-entriesLennart Poettering2019-04-1112-52/+101
|\ \ \ \ | | | | | | | | | | bootctl: check entries when showing them
| * | | | bootctl: urlify .conf filesZbigniew Jędrzejewski-Szmek2019-04-051-2/+10
| | | | | | | | | | | | | | | | | | | | Just because we can ;)
| * | | | bootctl: emit extra warning if the default boot entry is brokenZbigniew Jędrzejewski-Szmek2019-04-051-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Let's make it more obvious for the user if something is badly borked. It does the job, but I'm not too happy with this.
| * | | | bootctl: check if files specified by boot entry exist, and warn if notZbigniew Jędrzejewski-Szmek2019-04-052-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output: title: Fedora 30 (Workstation Edition) (5.0.5-300.fc30.x86_64) id: 08a5690a2eed47cf92ac0a5d2e3cf6b0-5.0.5-bad-300.fc30.x86_64 source: /boot/efi/loader/entries/08a5690a2eed47cf92ac0a5d2e3cf6b0-5.0.5-bad-300.fc30.x86_64.conf version: 5.0.5-300.fc30.x86_64 machine-id: 08a5690a2eed47cf92ac0a5d2e3cf6b0 linux: /08a5690a2eed47cf92ac0a/5.0.5-300.fc30.x86_64/linux (No such file or directory) initrd: /08a5690a2eed47cf92ac0a/5.0.5-300.fc30.x86_64/initrd (No such file or directory) /08a5690a2eed47cf92ac0a/5.0.5-300.fc30.x86_64/initrd2 (No such file or directory) options: ...
| * | | | bootspec: remove now-unused boot_entry_type_tableZbigniew Jędrzejewski-Szmek2019-04-052-11/+0
| | | | |
| * | | | bootctl: replace "type" with "source" in outputZbigniew Jędrzejewski-Szmek2019-04-053-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this is more useful (because it's easy to stick the path into an editor command when one wants to change the options or inspect the files), and more self-explanatory. Example output: title: Fedora 30 (Workstation Edition) (4.20.16-200.fc29.x86_64) id: 08a5690a2eed47cf92ac0a5d2e3cf6b0-4.20.16-200.fc29.x86_64 source: /boot/efi/loader/entries/08a5690a2eed47cf92ac0a5d2e3cf6b0-4.20.16-200.fc29.x86_64.conf version: 4.20.16-200.fc29.x86_64 ... title: Fedora 30 (Workstation Edition) id: fedora-30 source: /boot/efi/EFI/Linux/linux-5.0.5-300.fc30.x86_64-08a5690a2eed47cf92ac0a5d2e3cf6b0.efi linux: EFI/Linux/linux-5.0.5-300.fc30.x86_64-08a5690a2eed47cf92ac0a5d2e3cf6b0.efi ... title: Reboot Into Firmware Interface id: auto-reboot-to-firmware-setup source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
| * | | | efivars: add helper to format efivarfs pathZbigniew Jędrzejewski-Szmek2019-04-052-6/+16
| | | | |
| * | | | tree-wide: use SD_ID128_UUID_FORMAT_STR as appropriateZbigniew Jędrzejewski-Szmek2019-04-053-6/+8
| | | | |
| * | | | sd-id128: expose ID128_UUID_FORMAT_STRZbigniew Jędrzejewski-Szmek2019-04-055-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | It is generally useful, and can be made public in the same manner that SD_ID128_FORMAT_STR is.
* | | | | NEWS: update contributors and datev242Zbigniew Jędrzejewski-Szmek2019-04-111-5/+6
| | | | |
* | | | | hwdb: mark Apple Magic Trackpads as externalSebastian Krzyszkowiak2019-04-111-0/+8
| | | | | | | | | | | | | | | Applies only to USB - when connected via Bluetooth it already gets marked correctly.
* | | | | fstab-generator: use DefaultDependencies=no for /sysroot mountsJonathan Lebon2019-04-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we can end up with an ordering cycle. Since d54bab90, all local mounts now gain a default `Before=local-fs.target` dependency. This doesn't make sense for `/sysroot` mounts in the initrd though, since those happen later in the boot process. Closes: #12231
* | | | | Merge pull request #12279 from keszybz/sd-bus-long-signaturesLennart Poettering2019-04-115-6/+15
|\ \ \ \ \ | | | | | | | | | | | | sd-bus: properly handle messages with overlong signatures
| * | | | | sd-bus: add define for the maximum name lengthZbigniew Jędrzejewski-Szmek2019-04-112-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Less magic numbers in the code…
| * | | | | sd-bus: add define for the maximum signature lengthZbigniew Jędrzejewski-Szmek2019-04-113-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Less magic numbers in the code…
| * | | | | bus-message: validate signature in gvariant messagesZbigniew Jędrzejewski-Szmek2019-04-112-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would accept a message with 40k signature and spend a lot of time iterating over the nested arrays. Let's just reject it early, as we do for !gvariant messages.
* | | | | | Merge pull request #12274 from poettering/nss-fixletsLennart Poettering2019-04-113-36/+30
|\ \ \ \ \ \ | | | | | | | | | | | | | | some nss module fixlets
| * | | | | | nss-resolve: list more errors as cause for fallbackLennart Poettering2019-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If dbus-daemon kicks us from the bus or hangs, we should fallback too. Fixes: #12203
| * | | | | | nss-resolve: simplify conditionLennart Poettering2019-04-111-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of course, if the error is NXDOMAIN then it's not one of the errors listed for fallback, hence don't bother...
| * | | | | | nss-mymachines: return NO_RECOVERY instead of NO_DATA when we fail to do ↵Lennart Poettering2019-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D-Bus and similar This makes more semantical sense and is what we do in nss-resolve in a similar case, hence let's remove the differences here.
| * | | | | | nss-myhostname: unify code that handles NOT_FOUND caseLennart Poettering2019-04-111-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just some minor rework to make this more like nss-resolve.
| * | | | | | nss-resolve: resue a jump targetLennart Poettering2019-04-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We can reuse "fail" here, since it does the same thing.
| * | | | | | nss-resolve: return error properlyLennart Poettering2019-04-111-1/+1
| | | | | | |
| * | | | | | nss-resolve: drop unnecessary variableLennart Poettering2019-04-111-6/+3
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | We assign the same value to "ret" always, let's just return the value literally.
* | | | | | Merge pull request #12271 from poettering/errno-accept-againLennart Poettering2019-04-1112-61/+111
|\ \ \ \ \ \ | | | | | | | | | | | | | | accept() errno fixes
| * | | | | | tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() callLennart Poettering2019-04-1010-51/+72
| | | | | | |
| * | | | | | errno-util: add new ERRNO_IS_ACCEPT_AGAIN() testLennart Poettering2019-04-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is modelled after the existing ERRNO_IS_RESOURCES() and in particular ERRNO_IS_DISCONNECT(). It returns true for all transient network errors that should be handled like EAGAIN whenever we call accept() or accept4(). This is per documentation in the accept(2) man page that explicitly says to do so in the its "RETURN VALUE" section. The error list we cover is a bit more comprehensive, and based on existing code of ours. For example EINTR is included too (since we need that to cover cases where we call accept()/accept4() on a blocking socket), and of course ERRNO_IS_DISCONNECT() is a bit more comprehensive than the list in the man page too.