antonblanchard / kexec-lite

GNU General Public License v2.0
6 stars 17 forks source link

kexec: don't ignore kexec_file_load syscall failures #12

Closed jk-ozlabs closed 4 years ago

jk-ozlabs commented 4 years ago

Currently, a failure from the kexec_file_load syscall will print an error message, but the kexec process will still report a successful exit status. This means that callers of kexec cannot fail gracefully on signature verification errors.

This change adds an early exit (with non-zero exit status) on failure, in a similar manner to the existing kexec_load error paths.

Signed-off-by: Jeremy Kerr jk@ozlabs.org Fixes: 106891319 (Add support for kexec_file_load) Cc: Nayna Jain naynjain@ibm.com Cc: Eric Richter erichte@linux.ibm.com

naynajain commented 4 years ago

Tested. Looks good.

antonblanchard commented 4 years ago

Thanks @jk-ozlabs , @naynajain!

jk commented 4 years ago

@antonblanchard you mentioned the wrong person.

antonblanchard commented 4 years ago

@jk sorry about that