First of all, thanks Ard for the historical explanation! On 07/10/2022 06:11, Ard Biesheuvel wrote: > [...] >> I think it'd be great to make it configurable! Ard, do you have any >> sense of what the max/min, etc, should be here? >> > > Given that dbx on an arbitrary EFI system with secure boot enabled is > already almost 4k, that seems like a reasonable default. As for the > upper bound, there is no way to know what weird firmware bugs you > might tickle by choosing highly unusual values here. > > If you need to store lots of data, you might want to look at [0] for > some work done in the past on using capsule update for preserving data > across a reboot. In the general case, this is not as useful, as the > capsule is only delivered to the firmware after invoking the > ResetSystem() EFI runtime service (as opposed to SetVariable() calls > taking effect immediately). However, if you need to capture large > amounts of data, and can tolerate the uncertainty involved in the > capsule approach, it might be a reasonable option. > > [0] https://lore.kernel.org/all/20200312011335.70750-1-qiuxu.zhuo@xxxxxxxxx/ So, you mean 4K as the default? I can change, but I would try to not mess with the current users, is there a case you can imagine something like 4k would fail? Maybe 2K is safer? As for the maximum, I've tested with many values, and when it's larger than ~30000 for edk2/ovmf, it fails with EFI_OUT_OF_RESOURCES and doesn't collect the log; other than that, no issues observed. When set to ~24000, the interesting is that we have fewer big logs in /sys/fs/pstore, so it's nice to see compared to the bunch of 1K files heheh Anyway, let's agree on the default and then I can resubmit that, I'm glad you both consider that it's a good idea =) Thanks, Guilherme