Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kexec: Create a temporary file to hold .linux section in uki_probe()
**Problem** In the arm64 case, a temporary file for kernel is created in pez_arm64_probe() and passed down to info.kernel_fd later. However in the x86_64 case, nobody passes a temporary fd to info.kernel_fd, so finally the fd of the UKI image is passed to syscall. That is not the expected behavior. **Situation** The current framework of kexec-tools passes kernel fd to syscall. Meanwhile info.kernel_fd presents each probe with an opportunity to overwhelm the existing kernel fd. **Solution** In the UKI probe, a temporary file is created to hold the .linux section. Later, if no other probe methods set info.kernel_fd, it will be set in the UKI load method. This way, the correct fd can be passed to the syscall. Signed-off-by: Pingfan Liu <[email protected]> Cc: Simon Horman <[email protected]> To: [email protected] Signed-off-by: Simon Horman <[email protected]>
- Loading branch information