Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHD: write efivars in one go on Alpine and Ubuntu 22/24 the builtin `printf` seems to be enough to get a write the full input to somewhere in efivarfs, but on Debian 11 a `\n` in the output will cause an early partial write. If the data being written is easily determined to be an invalid value by the kernel (5.10 in the Debian 11 case), that write will fail with EINVAL, and in fact the UEFI variable will not be written at all. From a brief read, I believe this to be more related to a change in Bash between Debian 11 and Ubuntu 22, than a change on the kernel side. At least on Debian 11 I observed `printf <data> > /sys/firmware/efi/../` producing two write calls, rather than one, separated exactly at an `0x0a` in the input. And I've not found any obviously-related kernel changes since 5.10 that would make a pair of writes valid if they occurred. Ensure that we write a full UEFI variable's worth of data at once by applying `dd` with output block size set high enough to hold variable's new data.
- Loading branch information