Skip to content
Snippets Groups Projects
  1. Dec 09, 2023
  2. Nov 17, 2023
    • Simon Glass's avatar
      bootstd: Avoid freeing a non-allocated buffer · 741d1e9d
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      EFI applications can be very large and thus used to cause boot failures
      when malloc() space was exhausted.
      
      A recent changed fixed this by using the kernel_addr_r environment var
      as the address of the buffer. However, it still frees the buffer when
      the bootflow is discarded.
      
      Fix this by introducing a flag to indicate whether the buffer was
      allocated, or not.
      
      Note that kernel_addr_r is not the last word here. It might be better
      to use lmb to place images. But there is a lot of refactoring to do
      before we can remove the environment variables. The distro scripts rely
      on them so it is safe for bootstd to do so too.
      
      Fixes: 6a8c2f97 bootstd: Avoid allocating memory for the EFI file
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reported by: Simon Glass <sjg@chromium.org>
      Reported by: Shantur Rathore <i@shantur.com>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Tested-by: default avatarShantur Rathore <i@shantur.com>
      741d1e9d
  3. Nov 15, 2023
  4. Nov 12, 2023
  5. Nov 11, 2023
  6. Nov 10, 2023
Loading