The patch series contains some fixes and improvements in the lmb
code, along with addition of corresponding test cases for the changes
made.

The lmb_reserve() function currently does not check if the requested
reservation would overlap with existing reserved regions. While some
scenarios are being handled, some corner cases still exist. These are
being handled by patch 1, along with adding test cases for these
scenarios.

Patch 2 is handling the case of reserving a new region of memory, but
that region overlaps with an existing region. The current code only
handles one particular scenario, but prints a message for the other
scenario of an encompassing overlap and returns back. The patch
handles the encompassing overlap.

Patch 3 is an improvement whereby we allow coalescing a newly reserved
region with an existing region. The current code exits this check
prematurely.

Patch 4 is putting an ifdef in the lmb_map_update_notify() so that the
function contents are compiled only with EFI_LOADER. Reasoning for the
same is provided in the patch commit message.


Sughosh Ganu (4):
  lmb: check if a region can be reserved by lmb_reserve()
  lmb: handle scenario of of encompassing overlap
  lmb: check for a region's coalescing with all existing regions
  lmb: build lmb_map_update_notify() only with EFI_LOADER

 lib/lmb.c      |  40 +++++++++++++++-----
 test/lib/lmb.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 130 insertions(+), 10 deletions(-)

-- 
2.34.1


Reply via email to