[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 0/3] Runtime allocation of memory regions

From: Patrick Steinhardt
Subject: [RFC PATCH 0/3] Runtime allocation of memory regions
Date: Mon, 1 Jun 2020 21:34:33 +0200


as you may be aware, LUKS2 currently doesn't support the Argon2 key
derival function (KDF). While the implementation itself isn't much of a
problem in theory, one issue we currently have is that Argon2 is a
memory-safe KDF and thus requires huge chunks of memory. The memory
management subsystem isn't currently up to task to handle huge
allocations on all platforms. So back in March, we decided to improve
the MM subsystem first before landing Argon2 support.

This patch series is a first RFC to ask for feedback on my chosen
approach. It implements a new callback that may be set up by the
platform-MM-implementation. In case currently allocated memory regions
don't have sufficient bytes available to satisfy a given memory
allocation, the callback will be invoked in order to make an additional
memory region available that can satisfy the request.

As such, we avoid all the downsides of pre-allocating a huge heap and
can just dynamically handle any huge requests.

I only compile-tested the code, meaning it probably won't work
out-of-the-box. My intention is mainly to first get an agreement on
whether this seems like a sensible approach to fix the problem.


Patrick Steinhardt (3):
  mm: allow dynamically requesting additional memory regions
  efi: mm: extract function to add memory regions
  efi: mm: implement runtime addition of pages

 grub-core/kern/efi/mm.c | 66 +++++++++++++++++------------------------
 grub-core/kern/mm.c     | 11 ++++++-
 include/grub/mm.h       | 13 ++++++++
 3 files changed, 50 insertions(+), 40 deletions(-)


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]