1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

35865 Commits

Author SHA1 Message Date
Yu Watanabe
9f934223b2 prioq: add one more assertion 2018-10-17 01:08:51 +09:00
Lennart Poettering
6dd91b3682 tree-wide: CMP()ify all the things
Let's employ coccinelle to fix everything up automatically for us.
2018-10-16 17:45:53 +02:00
Michael Biebl
f7eed93f15 Set theme jekyll-theme-primer
This theme uses anchorjs to provide mouse-over anchor links.

Closes: #10418
2018-10-16 17:43:54 +02:00
Lennart Poettering
88925d2f80 man: fix spurious uppercasing 2018-10-16 17:19:23 +02:00
Lennart Poettering
66d7235e0b man: an attempt to reword the [Route] Type= man page
A follow-up for #10388.
2018-10-16 17:18:30 +02:00
Hui Yiqun
2d53f310de networkd: type support for "throw" in [Route] section 2018-10-16 17:09:21 +02:00
Lennart Poettering
535610b561 sd-boot: factor out searching for loader entry 2018-10-16 16:44:34 +02:00
Lennart Poettering
7f1ef12526 sd-boot: also set an ID for the reboot-into-firmware entry 2018-10-16 16:44:34 +02:00
Lennart Poettering
0e2bc73274 sd-boot: write the IDs of all discovered entries to an EFI variable
This is primarily useful for debugging, but can be useful for other
purposes too. For example userspace could check whether "auto-windows"
is included in the list, before triggering a boot-into-windows
operation.
2018-10-16 16:44:34 +02:00
Lennart Poettering
f82ecab0a9 efi: make efivar_set_raw() buffer argument VOID*
No need to define a type if it is just some arbitrary buffer for us
anyway.
2018-10-16 16:44:34 +02:00
Lennart Poettering
f538cc6548 sd-boot: add boot counting mechanism 2018-10-16 16:44:34 +02:00
Lennart Poettering
64e7e27cd4 sd-boot: coding style fix, don't rely on C's downgrade-to-bool feature for numerical values 2018-10-16 16:44:34 +02:00
Lennart Poettering
05907f25a5 sd-boot: remove left-over lgpl blurb 2018-10-16 16:44:34 +02:00
Lennart Poettering
2214cfbf50 sd-boot: simplify memory management in processing of unified kernel image a bit 2018-10-16 16:44:34 +02:00
Lennart Poettering
42cf81c26f sd-boot: properly free all config entry fields 2018-10-16 16:44:34 +02:00
Lennart Poettering
081cc95fec sd-boot: rename ConfigEntry field 'file' to 'id'
The field derives from a file name only in very specific cases, for
many cases it's a fixed string (for example, all "auto-" items are like
this). Also, even when it derives from a file name, it is processed a
bit, as suffixes are removed and the string is converted to lower case.

hence, let's name this field "id" instead, because that's what it is
used for: as general identification token.
2018-10-16 16:44:34 +02:00
Lennart Poettering
580fe4df59 sd-boot: break overly long function argument lists following our usual coding style 2018-10-16 16:44:34 +02:00
Lennart Poettering
1336bb9864 sd-boot: drop initialization of 'line' which we override in the next line anyway 2018-10-16 16:44:34 +02:00
Lennart Poettering
2880e665ab efi: explicity check for NULL in FreePoolp()
Firmware implementations are generally pretty bad, hence let's better
add an explicit check for NULL before invokin FreePool(), in particular
is it doesn't appear to be documented whether FreePool() is supposed to
be happy with NULL.
2018-10-16 16:44:34 +02:00
Lennart Poettering
3aaa95e0a0 efi: add cleanup handler for closing file descriptors 2018-10-16 16:44:34 +02:00
Lennart Poettering
b73acaed42 efi: add poor man's offsetof() implementation 2018-10-16 16:44:34 +02:00
Lennart Poettering
d10ba83a1b mkosi: update the boot loader from our freshly built one 2018-10-16 16:44:34 +02:00
Lennart Poettering
52d363e32e mkosi: make kmsg work in our mkosi builds at least 2018-10-16 16:33:55 +02:00
Lennart Poettering
0972c1aefa NEWS: explain the RLIMIT_NOFILE bump 2018-10-16 16:33:55 +02:00
Lennart Poettering
0bbee2c226 rlimit-util: don't call setrlimit() needlessly if it wouldn't change anything
Just a tiny tweak to avoid generating an error if there's no need to.
2018-10-16 16:33:55 +02:00
Lennart Poettering
a17c17122c core: bump RLIMIT_NOFILE soft+hard limit for systemd itself in all cases
Previously we'd do this for PID 1 only. Let's do this when running in
user mode too, because we know we can handle it.
2018-10-16 16:33:55 +02:00
Lennart Poettering
c35ee02c61 units: bump the RLIMIT_NOFILE soft limit for all services that access the journal
This updates the unit files of all our serviecs that deal with journal
stuff to use a higher RLIMIT_NOFILE soft limit by default. The new value
is the same as used for the new HIGH_RLIMIT_NOFILE we just added.

With this we ensure all code that access the journal has higher
RLIMIT_NOFILE. The code that runs as daemon via the unit files, the code
that is run from the user's command line via C code internal to the
relevant tools. In some cases this means we'll redundantly bump the
limits as there are tools run both from the command line and as service.
2018-10-16 16:33:55 +02:00
Lennart Poettering
52d6207578 core: raise the RLIMIT_NOFILE hard limit for all services by default
Following the discussions with the kernel folks, let's substantially
increase the hard limit (but not the soft limit) of RLIMIT_NOFILE to
256K for all services we start.

Note that PID 1 itself bumps the limit even further, to the max the
kernel allows. We can deal with that after all.
2018-10-16 16:33:55 +02:00
Lennart Poettering
1abaf4887d tree-wide: uniformly bump RLIMIT_NOFILE in all our tools that access the journal
This makes use of rlimit_nofile_bump() in all tools that access the
journal. In some cases this replaces older code to achieve this, and
others we add it in where it was missing.
2018-10-16 16:33:55 +02:00
Lennart Poettering
99ab6fdf8c core: add a new call for bumping RLIMIT_NOFILE to "high" values
Following discussions with some kernel folks at All Systems Go! it
appears that file descriptors are not really as expensive as they used
to be (both memory and performance-wise) and it should thus be OK to allow
programs (including unprivileged ones) to have more of them without ill
effects.

Unfortunately we can't just raise the RLIMIT_NOFILE soft limit
globally for all processes, as select() and friends can't handle fds
>= 1024, and thus unexpecting programs might fail if they accidently get
an fd outside of that range. We can however raise the hard limit, so
that programs that need a lot of fds can opt-in into getting fds beyond
the 1024 boundary, simply by bumping the soft limit to the now higher
hard limit.

This is useful for all our client code that accesses the journal, as the
journal merging logic might need a lot of fds. Let's add a unified
function for bumping the limit in a robust way.
2018-10-16 16:33:55 +02:00
Lennart Poettering
d6e069f412 def: add a "high" limit for RLIMIT_NOFILE
This simply adds a new constant we can use for bumping RLIMIT_NOFILE to
a "high" value. It default to 256K for now, which is pretty high, but
smaller than the kernel built-in limit of 1M.

Previously, some tools that needed a higher RLIMIT_NOFILE bumped it to
16K. This new define goes substantially higher than this, following the
discussion with the kernel folks.
2018-10-16 16:33:55 +02:00
Lennart Poettering
d3aeddb8d1 update TODO 2018-10-16 16:33:55 +02:00
Lennart Poettering
a53f90ca24 siphash24: add helper for calculating the hash value for a string
Let's shorten some code.
2018-10-16 16:27:15 +02:00
Lennart Poettering
43d3c94e64
Merge pull request #10416 from poettering/udev-coverity
three simple coverity fixes
2018-10-16 16:26:44 +02:00
Yu Watanabe
cd86deefa1 util: fix segfault in prioq_remove() with empty Prioq object 2018-10-16 22:27:30 +09:00
Yu Watanabe
d13b5f5a85 util,test: introduce cleanup function prioq_freep()
This also simplifies test-prioq.c.
2018-10-16 22:17:08 +09:00
Yu Watanabe
bbddd2b8d9 test: use CMP() macro at one more place 2018-10-16 21:56:46 +09:00
Lennart Poettering
cb542e8488 udev: (void)ify calls to kill() where we knowingly ignore the return values
CID 1368231
CID 1368229
2018-10-16 13:52:21 +02:00
Lennart Poettering
eb276e9841 udev: don't use devname before we acquired it
CID 1396107
2018-10-16 13:52:21 +02:00
Lennart Poettering
cdc2af3e15 core: log about unit_watch_pid() failing
CID 1237509
2018-10-16 13:52:21 +02:00
Lennart Poettering
2011149a3c
Merge pull request #10327 from yuwata/test-sd-device-enumerator-subsystem
sd-device-enumerator: dedup enumerated devices and add test for subsystem filtering
2018-10-16 12:48:01 +02:00
Yu Watanabe
7a223c2e38 update TODO 2018-10-16 19:21:15 +09:00
Yu Watanabe
915375ed3b test: add tests for sd_netlink_slot_set_*() 2018-10-16 18:49:42 +09:00
Yu Watanabe
c940a2310a test: add tests for sd_netlink_slot_get_*() 2018-10-16 18:42:42 +09:00
Yu Watanabe
8190a388a6 sd-netlink: make sd_netlink_slot take its description 2018-10-16 18:42:23 +09:00
Lennart Poettering
14d0a740b5 Set theme jekyll-theme-cayman 2018-10-16 11:32:09 +02:00
Zbigniew Jędrzejewski-Szmek
65d51875c2 catalog: fix name of variable
All the messages would (literally) say "The start-up result is RESULT."
because @RESULT@ was not defined.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1639482
and the first part of #8005.

Fixup for 646cc98dc8.
2018-10-16 10:21:08 +02:00
Harry Mallon
2c4370d66c rules: Add ID_REVISION environment var for NVMe devices 2018-10-16 10:20:31 +02:00
Zbigniew Jędrzejewski-Szmek
0919b554c6
Merge pull request #9824 from poettering/login-unit-fixes
many logind improvements
2018-10-16 09:34:27 +02:00
Zbigniew Jędrzejewski-Szmek
43debabc8b
Merge pull request #10391 from poettering/systemctl-exit-code-fixes
systemctl exit code fixes
2018-10-16 08:42:34 +02:00