mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 15:50:18 +00:00
leak chainload options and bump kernel
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
ARG KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.16.9.tar.xz
|
ARG KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.17.2.tar.xz
|
||||||
ARG KERNEL_CHECKSUM=sha256:7ac8c8a3cf05476375deaaa85dfcee095a826ffe557b437f43774fc3b64ce58d
|
ARG KERNEL_CHECKSUM=sha256:fdebcb065065f5c1b8dc68a6fb59cda50cdddbf9103d207c2196d55ea764f57f
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fd8f5a1df07b5195613e4b9a0b6a947d3772a151b81975db27d47f093f60c6e6 AS buildenv
|
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fd8f5a1df07b5195613e4b9a0b6a947d3772a151b81975db27d47f093f60c6e6 AS buildenv
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
|
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
|||||||
|
|
||||||
full_path.push_str(&context.stamp(&configuration.path));
|
full_path.push_str(&context.stamp(&configuration.path));
|
||||||
|
|
||||||
info!("path={}", full_path);
|
info!("path: {}", full_path);
|
||||||
|
|
||||||
let device_path = utils::text_to_device_path(&full_path)?;
|
let device_path = utils::text_to_device_path(&full_path)?;
|
||||||
|
|
||||||
@@ -52,7 +52,12 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
|||||||
CString16::try_from(&options[..])
|
CString16::try_from(&options[..])
|
||||||
.context("unable to convert chainloader options to CString16")?,
|
.context("unable to convert chainloader options to CString16")?,
|
||||||
);
|
);
|
||||||
info!("options={}", options);
|
info!("options: {}", options);
|
||||||
|
|
||||||
|
// TODO(azenla): Free this memory, if possible.
|
||||||
|
// The lifetime of the pointer needs ot outlive start_image.
|
||||||
|
// Maybe consider moving this up.
|
||||||
|
let options = Box::leak(options);
|
||||||
|
|
||||||
if options.num_bytes() > u32::MAX as usize {
|
if options.num_bytes() > u32::MAX as usize {
|
||||||
bail!("chainloader options too large");
|
bail!("chainloader options too large");
|
||||||
@@ -68,7 +73,7 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
|||||||
}
|
}
|
||||||
|
|
||||||
let (base, size) = loaded_image_protocol.info();
|
let (base, size) = loaded_image_protocol.info();
|
||||||
info!("loaded image base={:#x} size={:#x}", base.addr(), size);
|
info!("loaded image: base={:#x} size={:#x}", base.addr(), size);
|
||||||
uefi::boot::start_image(image).context("failed to start image")?;
|
uefi::boot::start_image(image).context("failed to start image")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user