summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hwdb: Allow end-users root-less access to TL866 EPROM readerswip/hadess/minipro-uaccessBastien Nocera2022-01-041-0/+11
| | | | | As is currently done in the upstream minipro tool: https://gitlab.com/DavidGriffith/minipro/-/tree/master/udev
* Revert "udev: Import hwdb matches for USB devices"Zbigniew Jędrzejewski-Szmek2022-01-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94cb45d57f6e94dd4c93bd4706f9be70634bf03f. This rule set up a duplicate import: $ udevadm test /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.1/2-4.1.3 ... 2-4.1.3: /usr/lib/udev/rules.d/40-libgphoto2.rules:9 Importing properties from results of builtin command 'usb_id' 2-4.1.3: /usr/lib/udev/rules.d/50-udev-default.rules:13 Skipping builtin 'usb_id' in IMPORT key 2-4.1.3: /usr/lib/udev/rules.d/50-udev-default.rules:13 Importing properties from results of builtin command 'hwdb --subsystem=usb' 2-4.1.3: hwdb modalias key: "usb:v17EFp3054:OneLink+ Giga" 2-4.1.3: /usr/lib/udev/rules.d/50-udev-default.rules:15 Importing properties from results of builtin command 'hwdb 'usb:v17efp3054'' 2-4.1.3: No entry found from hwdb. 2-4.1.3: /usr/lib/udev/rules.d/50-udev-default.rules:15 Failed to run builtin 'hwdb 'usb:v17efp3054'': No data available 2-4.1.3: /usr/lib/udev/rules.d/50-udev-default.rules:52 MODE 0664 except that the existing one was done with uppercase digits and the full match pattern, and the second one was done with lowercase digits. With the previous commit we only have uppercase digits in our match patterns, so we can drop the duplicate import. (Some other projects might have rules that used the lowercase match patterns, and people might have some local rules that did that too. But the second import was only added recently so I think it's better to rip off the bandaid quickly.)
* hwdb: make usb match patterns uppercaseZbigniew Jędrzejewski-Szmek2022-01-041-2/+2
| | | | Those patterns were always supposed to be uppercase.
* hwdb: fix check for uppercasedness of match patternsZbigniew Jędrzejewski-Szmek2022-01-041-4/+6
| | | | | | | | | | | | | | | | | | | The check was added in 77547d5313ea916d2fb64ca5a8812734e9b50f92, but it doesn't work as expected. Because the second part is wrapped in Optional(), it would silently "succeed" when the lowercase digits were in the second part: >>> from parse_hwdb import * >>> g = 'v' + upperhex_word(4) + Optional('p' + upperhex_word(4)) >>> g.parseString('v04D8pE11C*') (['v', '04D8', 'p', 'E11C'], {}) >>> g.parseString('v04D8pe11c*') (['v', '04D8'], {}) The following matches are OK: usb:v0627p0001:*QEMU USB Keyboard* usb:v0627p0001:* usb:v0627p0001* usb:v0627*
* Merge pull request #21778 from evverx/test-cifuzzYu Watanabe2022-01-043-4/+4
|\ | | | | tests: run nss-{users|hosts} by default
| * tests: no longer load libnss_{files|dns}Evgeny Vereshchagin2022-01-032-2/+2
| | | | | | | | | | Those libraries aren't provided by systemd so they shouldn't be included here
| * tests: run nss-{users|hosts} by defaultEvgeny Vereshchagin2022-01-021-2/+2
| | | | | | | | | | to prevent issues like https://github.com/systemd/systemd/issues/21935 by testing the code under ASan/UBSan
* | fuzz: no longer skip empty filesEvgeny Vereshchagin2022-01-047-28/+16
| | | | | | | | | | | | | | | | Empty files and empty strings seem to have triggered various issues in the past so it seems they shouldn't be ignore by the fuzzers just because fmemopen can't handle them. Prompted by https://github.com/systemd/systemd/pull/21939#issuecomment-1003113669
* | po: Update translation filesWeblate2022-01-042-5/+8
| | | | | | | | | | | | | | | | Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Co-authored-by: Weblate <noreply@weblate.org> Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ Translation: systemd/main
* | meson: generate better arch defines for clang bpf compilationZbigniew Jędrzejewski-Szmek2022-01-041-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The code assume that meson's cpu_family can be mapped directly to '-D__<cpu_family>__'. This works in a surprising number of cases, but not for a few architectures. PPC uses "powerpc", and RISC-V omits the trailing underscores. ARM and RISC-V require a second define too. Fixes #21900. (I don't think this matters too much: we need *something* so that gnu/stubs.h can be successfully included. But we don't actually call syscalls or depend too much on the host environment, so things should be fine as long as we don't get a compilation error.)
* | Merge pull request #21990 from keszybz/indentation-and-commentsLuca Boccassi2022-01-0448-143/+88
|\ \ | | | | | | Indentation and comments
| * | po: drop Project-Id-Version from header templateZbigniew Jędrzejewski-Szmek2022-01-0336-36/+0
| | | | | | | | | | | | | | | Since they were pretty inconsistent anyway, let's assume that they don't matter.
| * | various: fix three spelling issues found by fossiesZbigniew Jędrzejewski-Szmek2022-01-033-4/+4
| | |
| * | docs: update branch namesZbigniew Jędrzejewski-Szmek2022-01-036-19/+19
| | | | | | | | | | | | | | | Also use --atomic when pushing multiple items with git; adjust some external URLs.
| * | basic: adjust wording and wrapping of commentsZbigniew Jędrzejewski-Szmek2022-01-031-19/+19
| | |
| * | test-bpf-lsm: drop some parensZbigniew Jędrzejewski-Szmek2022-01-031-4/+2
| | |
| * | test-job-type: modernize code a bitZbigniew Jędrzejewski-Szmek2022-01-031-22/+19
| | |
| * | core/bpf: tighten handling of return values, improve messagesZbigniew Jędrzejewski-Szmek2022-01-031-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was written unidiomatically, using r as a boolean value, and confusing errno and r in some places. AFAICS, there wasn't any actual problem: even in the one place where errno was used instead of r, it would almost certainly be initialized. It seems that some libbpf functions set errno, while others return the error, possibly encoded. Since there are almost no docs, the only way to know is to read the code of the function. To make matters worse, there is a global libbpf_mode which can be set to change the convention. With LIBBPF_STRICT_DIRECT_ERRS in libbpf_mode, some functions set errno while others return a negative error, and the only way to know is to read the code, except that the split is now different. We currently don't set LIBBPF_STRICT_DIRECT_ERRS, but even the possibility makes everything harder to grok. This is all very error-prone. Let's at least add some asserts to make sure that the returned values are as expected.
| * | core/bpf: avoid unnecessary initialization of variables, tighten scopeZbigniew Jędrzejewski-Szmek2022-01-031-24/+13
| | | | | | | | | | | | No funtional change.
* | | basic/log: allow errno values higher than 255Zbigniew Jędrzejewski-Szmek2022-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the support for "synthetic errno" was added, we started truncating the errno value to just the least significant byte. This is generally OK, because errno values are defined up to ~130. The docs don't really say what the maximum value is. But at least in principle higher values could be added in the future. So let's stop truncating the values needlessly. The kernel (or libbpf?) have an error where they return 524 as an errno value (https://bugzilla.redhat.com/show_bug.cgi?id=2036145). We would confusingly truncate this to 12 (ENOMEM). It seems much nicer to let strerror() give us "Unknown error 524" rather than to print the bogus message about ENOMEM.
* | | coredump: do not crash if we failed to acquire exe pathZbigniew Jędrzejewski-Szmek2022-01-031-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The COREDUMP_EXE attribute is "optional", i.e. we continue to process the crash even if we didn't acquire it. The coredump generation code assumed that it is always available: #5 endswith at ../src/fundamental/string-util-fundamental.c:41 [ endswith() is called with NULL here, and an assertion fails. ] #6 submit_coredump at ../src/coredump/coredump.c:823 #7 process_socket at ../src/coredump/coredump.c:1038 #8 run at ../src/coredump/coredump.c:1413 We use the exe path for loop detection, and also (ultimately) pass it to dwfl_core_file_report(). The latter seems to be fine will NULL, so let's just change our code to look at COMM, which should be more reliable anyway. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2036517.
* | | Merge pull request #21985 from yuwata/elf-util-cleanupsLuca Boccassi2022-01-032-69/+76
|\ \ \ | | | | | | | | elf-util: several cleanups
| * | | coredump: drop unnecessary parenthesesYu Watanabe2022-01-041-3/+2
| | | |
| * | | elf-util: add missing assertionYu Watanabe2022-01-041-0/+2
| | | |
| * | | elf-util: reduce variable scopeYu Watanabe2022-01-041-3/+3
| | | |
| * | | elf-util: executable argument for parse_elf() may be NULLYu Watanabe2022-01-041-3/+5
| | | | | | | | | | | | | | | | Fixes assertion triggered by parse_package_metadata() and json_build().
| * | | elf-util: reduce variable scope and indentationYu Watanabe2022-01-041-40/+42
| | | |
| * | | elf-util: reduce variable scope and indentationYu Watanabe2022-01-041-20/+22
|/ / /
* | | Merge pull request #21941 from yuwata/hostname-handle-emptyZbigniew Jędrzejewski-Szmek2022-01-034-15/+13
|\ \ \ | | | | | | | | hostname-setup: support kernel with empty CONFIG_DEFAULT_HOSTNAME
| * | | hostname-util: drop GET_HOSTNAME_ALLOW_NONE flag and always refuse "(none)"Yu Watanabe2021-12-313-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | The flag is now only used in test-sysctl-util.c, and it should be replaced with uname(), because of the same reason as the previous commit.
| * | | hostname-setup: gracefully handle kernel with empty CONFIG_DEFAULT_HOSTNAMEYu Watanabe2021-12-311-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, sethostname_idempotent_full() calls gethostname_full() with GET_HOSTNAME_ALLOW_NONE and GET_HOSTNAME_ALLOW_LOCALHOST flags. That intended to get any values set by kernel. But, that does not work, as the hostname may be empty. Let's simplify the logic. The function sethostname_idempotent_full() intends to set the requested hostname only when the current hostname is different from the requested one. So, no check in getostname_full() is required. Hence, simply use the result of uname() here. Fixes #21896.
* | | | boot: Do not warn if an initializing driver returns EFI_ABORTEDJan Janssen2022-01-031-2/+7
| | | | | | | | | | | | | | | | Fixes: #21965
* | | | Merge pull request #21970 from yuwata/seccomp-util-fix-buildZbigniew Jędrzejewski-Szmek2022-01-0315-18/+83
|\ \ \ \ | | | | | | | | | | seccomp-util: fix build failure
| * | | | seccomp-util: include missing_syscall_def.h to make __SNR_foo mapped to __NR_fooYu Watanabe2022-01-031-7/+4
| | | | | | | | | | | | | | | | | | | | Fixes #21969.
| * | | | missing-syscall: add __NR_openat2Yu Watanabe2022-01-032-0/+67
| | | | |
| * | | | syscalls: update syscall definitionsYu Watanabe2022-01-0312-11/+12
| | | | |
* | | | | ci: bump mkosi to v12 with libsolv workaroundFrantisek Sumsal2022-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces: https://github.com/systemd/systemd/pull/21574 Related: * https://github.com/systemd/mkosi/issues/861 * https://github.com/systemd/mkosi/pull/878
* | | | | Merge pull request #21960 from medhefgo/boot-gapEvgeny Vereshchagin2022-01-033-1/+8
|\ \ \ \ \ | |_|_|_|/ |/| | | | boot: Use objcopy to align sections
| * | | | ci: Test efi binaries for section table gapsJan Janssen2022-01-021-0/+6
| | | | |
| * | | | boot: Use objcopy to align sectionsJan Janssen2022-01-022-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not aligning these can create gaps in the section table. Some firmware does not handle this nicely resulting in secure boot signature fails. Using objcopy ensures that any new sections in the future will be properly aligned. Fixes: #21956
* | | | Merge pull request #21944 from yuwata/nss-systemd-fix-pointerYu Watanabe2022-01-032-5/+5
|\ \ \ \ | |/ / / |/| | | nss-systemd: fix pointer calculation
| * | | nss-myhostname: do not apply non-zero offset to null pointerYu Watanabe2021-12-311-3/+3
| | | | | | | | | | | | | | | | Fixes https://github.com/systemd/systemd/issues/21935#issuecomment-1003216503.
| * | | nss-systemd: fix alignment of gr_memYu Watanabe2021-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 1e65eb8f9b7d567462030b2e625998d77677e636. Fixes #21935.
* | | | Merge pull request #21928 from medhefgo/boot-mesonYu Watanabe2022-01-022-13/+5
|\ \ \ \ | | | | | | | | | | meson: Boot
| * | | | meson: Get objcopy location from compilerJan Janssen2022-01-021-1/+1
| | | | |
| * | | | meson: Remove efi-cc optionJan Janssen2022-01-022-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the efi compiler this way doesn't really work. The gnu-efi header checks as well as supported compiler flag checks use the regular cc that meson detects. Changing the compiler this way will end up with bad compiler flags. For the very same reason, this does not work with a cross-compiler without going through proper meson cross-compilation steps either. The proper way to build systemd-boot with a different compiler is to use a different build folder and then just use the proper ninja build target to only build the bootloader/stub.
* | | | | boot: Add disabled secure boot mode without setup modeJan Janssen2022-01-022-0/+7
| | | | |
* | | | | make HP 15s-eq0xxx changes specific to sku9MG38EA#ABZMarco Scardovi2022-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-Off-By: Marco Scardovi <marco@scardovi.com>
* | | | | Merge pull request #21915 from evverx/fuzz-bcdFrantisek Sumsal2022-01-023-1/+47
|\ \ \ \ \ | |/ / / / |/| | | | tests: add fuzz-bcd
| * | | | oss-fuzz: turn on the alignment checkEvgeny Vereshchagin2021-12-291-1/+2
| | | | |