systemd/docs
Luca Boccassi bb5232b6a3 core: add systemd-executor binary
Currently we spawn services by forking a child process, doing a bunch
of work, and then exec'ing the service executable.

There are some advantages to this approach:

- quick: we immediately have access to all the enourmous amount of
  state simply by virtue of sharing the memory with the parent
- easy to refactor and add features
- part of the same binary, will never be out of sync

There are however significant drawbacks:

- doing work after fork and before exec is against glibc's supported
  case for several APIs we call
- copy-on-write trap: anytime any memory is touched in either parent
  or child, a copy of that page will be triggered
- memory footprint of the child process will be memory footprint of
  PID1, but using the cgroup memory limits of the unit

The last issue is especially problematic on resource constrained
systems where hard memory caps are enforced and swap is not allowed.
As soon as PID1 is under load, with no page out due to no swap, and a
service with a low MemoryMax= tries to start, hilarity ensues.

Add a new systemd-executor binary, that is able to receive all the
required state via memfd, deserialize it, prepare the appropriate
data structures and call exec_child.

Use posix_spawn which uses CLONE_VM + CLONE_VFORK, to ensure there is
no copy-on-write (same address space will be used, and parent process
will be frozen, until exec).
The sd-executor binary is pinned by FD on startup, so that we can
guarantee there will be no incompatibilities during upgrades.
2023-10-12 15:01:51 +01:00
..
_data docs: beef up entrypoint documentation page 2019-12-11 10:53:14 +01:00
_includes update footer to 2023 2023-01-29 20:26:28 +09:00
_layouts docs: adapt forward layout to systemd.io design 2022-05-21 18:09:50 +02:00
assets docs: add dark mode 2022-05-17 23:00:18 +02:00
fonts docs: make it pretty 2019-12-11 17:04:20 +01:00
sysvinit tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
var-log tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
.gitattributes docs: mark spdx headers with the default license to website files 2021-10-18 09:43:18 +02:00
.gitignore gitignore: add jekyll cache directory 2021-06-24 10:20:29 +02:00
_config.yml docs: use https:// for fd.o links 2022-01-12 16:05:59 +01:00
ARCHITECTURE.md core: add systemd-executor binary 2023-10-12 15:01:51 +01:00
AUTOMATIC_BOOT_ASSESSMENT.md docs: fix grammar a bit 2023-01-23 22:52:34 +00:00
BLOCK_DEVICE_LOCKING.md tree-wide: use -EBADF for fd initialization 2022-12-19 15:00:57 +01:00
BOOT_LOADER_INTERFACE.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
BOOT_LOADER_SPECIFICATION.md docs: DPS and BLS have moved to uapi-group.org 2022-11-02 07:31:18 +09:00
BUILDING_IMAGES.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
CGROUP_DELEGATION.md core: add DelegateSubgroup= setting 2023-04-27 12:18:32 +02:00
CODE_OF_CONDUCT.md docs: add spdx tags to all .md files 2021-09-27 09:19:02 +02:00
CODE_QUALITY.md docs: fix formatting a bit 2023-01-23 22:52:34 +00:00
CODING_STYLE.md doc: readd vanished ``` 2023-10-11 11:41:56 +02:00
CONTAINER_INTERFACE.md tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
CONTRIBUTING.md docs: update link to RHEL/CentOS Stream tracker 2023-08-11 09:55:10 +01:00
CONVERTING_TO_HOMED.md docs: tweak rsync flags for moving existing home dir to systemd-homed 2023-02-01 20:47:56 +00:00
COREDUMP.md tree-wide: code spelling fixes 2023-04-20 21:54:59 +02:00
COREDUMP_PACKAGE_METADATA.md docs: rename COREDUMP_PACKAGE_METADATA → ELF_PACKAGE_METADATA 2022-05-21 18:08:19 +02:00
CREDENTIALS.md docs: fix order 2023-07-13 09:37:00 +00:00
DESKTOP_ENVIRONMENTS.md docs: fix typo in key name and adjust grammar a bit 2022-01-10 13:22:48 +01:00
DISCOVERABLE_PARTITIONS.md docs: DPS and BLS have moved to uapi-group.org 2022-11-02 07:31:18 +09:00
DISTRO_PORTING.md Drop split-usr and unmerged-usr support 2023-07-28 19:34:03 +01:00
ELF_PACKAGE_METADATA.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
ENVIRONMENT.md repart: add simple mechanism to override fstype choices 2023-10-05 19:18:36 +02:00
favicon.png docs: make it pretty 2019-12-11 17:04:20 +01:00
favicon.svg docs: mark spdx headers with the default license to website files 2021-10-18 09:43:18 +02:00
FILE_DESCRIPTOR_STORE.md docs/FDS: add missing article and reword sentence 2023-09-25 11:30:02 +01:00
GROUP_RECORD.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
HACKING.md Update HACKING instructions 2023-10-06 09:16:33 +02:00
HOME_DIRECTORY.md treewide: fix "an" before consonant U sounds 2023-07-06 11:59:41 +01:00
index.md tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
INITRD_INTERFACE.md tree-wide: use mode=0nnn for mount option 2022-12-14 22:12:44 +01:00
JOURNAL_EXPORT_FORMATS.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
JOURNAL_FILE_FORMAT.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
JOURNAL_NATIVE_PROTOCOL.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
MEMORY_PRESSURE.md tree-wide: code spelling fixes 2023-04-20 21:54:59 +02:00
NETWORK_ONLINE.md docs/NETWORK_ONLINE: Use until instead of while ! 2023-08-14 09:15:31 +02:00
PASSWORD_AGENTS.md Use https for man7.org 2022-06-28 16:05:31 +02:00
PORTABILITY_AND_STABILITY.md docs: list all public headers in stability promise 2023-05-16 08:50:11 +02:00
PORTABLE_SERVICES.md portable: add PORTABLE_NAME_AND_VERSION= and other metadata to LogsExtraFields= 2023-03-28 12:14:21 +01:00
PORTING_TO_NEW_ARCHITECTURES.md docs: fix grammar a bit 2023-01-23 22:52:34 +00:00
PREDICTABLE_INTERFACE_NAMES.md docs: move some stuff into "Networking" section 2022-07-05 11:22:06 +01:00
RANDOM_SEEDS.md docs: fix grammar a bit 2023-01-23 22:52:34 +00:00
RELEASE.md doc-sync: add support for uploading the documentation for main 2023-10-10 17:50:04 +01:00
RESOLVED-VPNS.md docs: avoid multiple first-level headlines 2022-05-17 23:00:18 +02:00
ROOT_STORAGE_DAEMONS.md docs: note root storage daemons can now also use SurviveFinalKillSignal=yes 2023-09-28 13:48:14 +01:00
SECURITY.md docs: add spdx tags to all .md files 2021-09-27 09:19:02 +02:00
style.css docs: desaturate dark-mode background color 2022-06-10 13:52:31 +02:00
TEMPORARY_DIRECTORIES.md a colloquial abbreviation 'btw' in TEMPORARY_DIRECTORIES.md (#27365) 2023-04-23 10:48:17 +01:00
TESTING_WITH_SANITIZERS.md mkosi: Update to latest 2023-03-29 13:27:19 +02:00
TPM2_PCR_MEASUREMENTS.md docs: document that in future we'll do EV_EVENT_TAG only, no EV_IPL 2023-10-10 23:31:33 +01:00
TRANSIENT-SETTINGS.md journal: log filtering options support in PID1 2022-12-15 09:57:39 +00:00
TRANSLATORS.md docs: replace <pre>, <code> and <tt> tags by backticks 2022-05-17 22:35:54 +02:00
UIDS-GIDS.md treewide: fix "an" before consonant U sounds 2023-07-06 11:59:41 +01:00
USER_GROUP_API.md docs, man: consistently use comma after "For example" 2023-01-23 22:52:34 +00:00
USER_NAMES.md docs, man: consistently use comma after "For example" 2023-01-23 22:52:34 +00:00
USER_RECORD.md tree-wide: "<n>bit" → "<n>-bit" 2023-07-02 11:10:12 +01:00
USERDB_AND_DESKTOPS.md docs, man: consistently use comma after "For example" 2023-01-23 22:52:34 +00:00