mirror of
https://github.com/tailix/kernel.git
synced 2024-12-11 11:35:39 -05:00
Revert "More strict verification of ELF header"
This reverts commit e3ebea5d9a
.
This commit is contained in:
parent
e3ebea5d9a
commit
8e3260cbf1
1 changed files with 4 additions and 7 deletions
|
@ -21,13 +21,13 @@ struct KernelMQ_ELF_Header {
|
|||
unsigned long elf_version : 32; // Must be 1.
|
||||
unsigned long entrypoint : 32;
|
||||
unsigned long prog_table_pos : 32; // Must not be 0.
|
||||
unsigned long sect_table_pos : 32; // Must not be 0.
|
||||
unsigned long sect_table_pos : 32;
|
||||
unsigned long arch_flags : 32; // Must be 0.
|
||||
unsigned short header_size : 16; // Must be 52.
|
||||
unsigned short prog_entr_size : 16; // Must not be 0.
|
||||
unsigned short prog_entr_num : 16; // Must not be 0.
|
||||
unsigned short sect_entr_size : 16; // Must not be 0.
|
||||
unsigned short sect_entr_num : 16; // Must not be 0.
|
||||
unsigned short sect_entr_size : 16;
|
||||
unsigned short sect_entr_num : 16;
|
||||
unsigned short sect_names_idx : 16;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
@ -85,10 +85,7 @@ unsigned char KernelMQ_ELF_Header_is_valid(
|
|||
header->header_size == 52 &&
|
||||
header->prog_table_pos != 0 &&
|
||||
header->prog_entr_size != 0 &&
|
||||
header->prog_entr_num != 0 &&
|
||||
header->sect_table_pos != 0 &&
|
||||
header->sect_entr_size != 0 &&
|
||||
header->sect_entr_num != 0
|
||||
header->prog_entr_num != 0
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue