Skip to content

Commit 0385855

Browse files
committed
efi/pe: Import new BTI/IBT header flags from the spec
The latest version of your favorite fork of the PE/COFF spec includes a new type of header flag that is intended to be used in the context of EFI firmware to indicate to the image loader that the executable regions of an image can be mapped with BTI/IBT enforcement enabled. So let's import these definitions so we can use them in subsequent patches. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 8364f6d commit 0385855

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/linux/pe.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@
118118
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
119119
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
120120

121+
#define IMAGE_DLLCHARACTERISTICS_EX_CET_COMPAT 0x0001
122+
#define IMAGE_DLLCHARACTERISTICS_EX_FORWARD_CFI_COMPAT 0x0040
123+
121124
/* they actually defined 0x00000000 as well, but I think we'll skip that one. */
122125
#define IMAGE_SCN_RESERVED_0 0x00000001
123126
#define IMAGE_SCN_RESERVED_1 0x00000002
@@ -165,6 +168,7 @@
165168
#define IMAGE_SCN_MEM_WRITE 0x80000000 /* writeable */
166169

167170
#define IMAGE_DEBUG_TYPE_CODEVIEW 2
171+
#define IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS 20
168172

169173
#ifndef __ASSEMBLY__
170174

0 commit comments

Comments
 (0)