All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Runtime allocation of memory regions
@ 2020-06-01 19:34 Patrick Steinhardt
  2020-06-01 19:34 ` [RFC PATCH 1/3] mm: allow dynamically requesting additional " Patrick Steinhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Patrick Steinhardt @ 2020-06-01 19:34 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Leif Lindholm, Daniel Kiper

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

Hi,

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

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(-)

-- 
2.26.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-15 10:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 19:34 [RFC PATCH 0/3] Runtime allocation of memory regions Patrick Steinhardt
2020-06-01 19:34 ` [RFC PATCH 1/3] mm: allow dynamically requesting additional " Patrick Steinhardt
2020-06-01 19:34 ` [RFC PATCH 2/3] efi: mm: extract function to add " Patrick Steinhardt
2020-06-01 19:34 ` [RFC PATCH 3/3] efi: mm: implement runtime addition of pages Patrick Steinhardt
2020-06-02 12:57   ` Vladimir 'phcoder' Serbinenko
2021-08-08 13:31 ` [PATCH v2 0/4] Runtime allocation of memory regions Patrick Steinhardt
2021-08-08 13:31   ` [PATCH v2 1/4] mm: Allow dynamically requesting additional " Patrick Steinhardt
2021-08-09 15:52     ` Daniel Kiper
2021-08-08 13:31   ` [PATCH v2 2/4] efi: mm: Extract function to add " Patrick Steinhardt
2021-08-09 16:02     ` Daniel Kiper
2021-08-08 13:31   ` [PATCH v2 3/4] efi: mm: Pass up errors from `add_memory_regions ()` Patrick Steinhardt
2021-08-09 16:10     ` Daniel Kiper
2021-08-15 10:20       ` Patrick Steinhardt
2021-08-08 13:31   ` [PATCH v2 4/4] efi: mm: Implement runtime addition of pages Patrick Steinhardt
2021-08-09 16:24     ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.