Files
snapd/osutil
Michael Vogt a79c7b8121 secboot: use half the mem for KDF in AddRecoveryKey
* osutil: rework TotalSystemMemory to TotalUsableMemory

This commit renames total TotalSystemMemory to TotalUsableMemory
and also changes the code to take the CmaTotal into account. This
is the memory reserved by the  "Contiguous Memory Allocator" and
it is not usable for normal processes. This kind of memory is
used e.g. by the framebuffer of the Raspberry Pi or by DSPs on
certain boards.

* secboot: use half the mem for KDF in AddRecoveryKey

Instead of benchmarking the KDF parameters for the recovery key
(which takes some time to run) we can also use defaults for the
KDF parameters. The defaults suggested by Chris are "4 iterations"
and half the usable memory. This commit implements the suggestions.

* secboot: update KDF memory heuristic

After discussing with Chris and Samuele we updated the KDF memory
heuristic so that it takes more parameters in mind. It now
considers the usable memory and substracts a hardcoded 384MB
that is required to have a working system (a bit of a conservative
estiamte) and then takes half of this for the KDF memory.

* osutil,secboot: fix typos

* secboot: add comment about minimum mem
2021-08-19 22:22:43 +02:00
..
2019-03-04 08:48:56 +00:00
2020-06-02 13:12:09 +01:00
2017-03-24 20:58:43 +01:00
2019-04-29 08:35:57 +02:00
2020-06-02 13:12:09 +01:00
2016-10-20 20:56:29 +02:00
2020-08-11 11:34:04 +02:00
2017-09-26 07:02:11 -04:00
2020-07-16 13:04:26 +02:00
2021-01-26 11:59:13 -06:00
2021-06-16 17:56:25 +03:00
2021-06-16 17:56:25 +03:00