summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-04-18 15:49:47 +0200
committerArd Biesheuvel <ardb@kernel.org>2023-04-20 15:43:34 +0200
commit038585573d0544bc717cdc5b3be4e95206d3ee3d (patch)
tree892142c9c6ff672bd33e64a79095651c5e5e9c81
parent8364f6d000ede4185a82b1f2514543ed172d4b51 (diff)
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>
-rw-r--r--include/linux/pe.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/pe.h b/include/linux/pe.h
index 6ffabf1e6d03..5e1e11540870 100644
--- a/include/linux/pe.h
+++ b/include/linux/pe.h
@@ -118,6 +118,9 @@
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
+#define IMAGE_DLLCHARACTERISTICS_EX_CET_COMPAT 0x0001
+#define IMAGE_DLLCHARACTERISTICS_EX_FORWARD_CFI_COMPAT 0x0040
+
/* they actually defined 0x00000000 as well, but I think we'll skip that one. */
#define IMAGE_SCN_RESERVED_0 0x00000001
#define IMAGE_SCN_RESERVED_1 0x00000002
@@ -165,6 +168,7 @@
#define IMAGE_SCN_MEM_WRITE 0x80000000 /* writeable */
#define IMAGE_DEBUG_TYPE_CODEVIEW 2
+#define IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS 20
#ifndef __ASSEMBLY__