pub enum ImageError {
Show 26 variants
TruncatedHeader,
BadMagic,
BadClass,
BadEndianness,
BadIdentVersion,
BadVersion,
BadHeaderSize,
BadProgramHeaderSize,
BadProgramHeaders,
BadSectionHeaders,
TruncatedProgramHeaders,
TooManyProgramHeaders,
UnsupportedType,
UnsupportedMachine,
NoLoadableSegments,
TooManySegments,
SegmentOutOfBounds,
SegmentOverflow,
EmptySegment,
FileSizeExceedsMemorySize,
MisalignedSegment,
BadSegmentAlignment,
UnorderedSegments,
OverlappingSegments,
ImageTooLarge,
LoadTooLarge,
}Expand description
Reasons why an image is rejected.
Variants§
TruncatedHeader
The input is smaller than the ELF64 header.
BadMagic
The magic bytes are not \x7fELF.
BadClass
The ELF class is not 64-bit.
BadEndianness
The data encoding is not little-endian.
BadIdentVersion
The e_ident version is not 1.
BadVersion
The header version is not 1.
BadHeaderSize
e_ehsize is not 64.
BadProgramHeaderSize
e_phentsize is not 56.
BadProgramHeaders
The program header table location is invalid.
BadSectionHeaders
The section header table is malformed (unused by the guest loader, but rejected by the shared parser).
TruncatedProgramHeaders
The program header table extends past the end of the file.
TooManyProgramHeaders
The program header count exceeds MAX_PROGRAM_HEADERS.
UnsupportedType
The ELF type is neither ET_EXEC nor ET_DYN.
UnsupportedMachine
The ELF machine is not x86-64.
NoLoadableSegments
No PT_LOAD segment was found.
TooManySegments
More than MAX_SEGMENTS loadable segments.
SegmentOutOfBounds
A segment’s file-backed data extends past the end of the file.
SegmentOverflow
A segment address or size overflows the 64-bit range.
EmptySegment
A loadable segment has a zero memory size.
FileSizeExceedsMemorySize
A segment’s p_filesz exceeds its p_memsz.
MisalignedSegment
A segment’s virtual address and file offset are not page congruent.
BadSegmentAlignment
A segment’s p_align is neither 0/1 nor a power of two.
UnorderedSegments
Loadable segments are not sorted by increasing virtual address.
OverlappingSegments
Loadable segments overlap after page alignment.
ImageTooLarge
The image file is larger than MAX_IMAGE_BYTES.
LoadTooLarge
The loaded footprint is larger than MAX_LOAD_BYTES.
Trait Implementations§
Source§impl Clone for ImageError
impl Clone for ImageError
impl Copy for ImageError
Source§impl Debug for ImageError
impl Debug for ImageError
impl Eq for ImageError
Source§impl PartialEq for ImageError
impl PartialEq for ImageError
impl StructuralPartialEq for ImageError
Auto Trait Implementations§
impl Forget for ImageError
impl Freeze for ImageError
impl Move for ImageError
impl RefUnwindSafe for ImageError
impl Send for ImageError
impl Sync for ImageError
impl Unpin for ImageError
impl UnsafeUnpin for ImageError
impl UnwindSafe for ImageError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more