From 98bcc51b0925a92db28f127d08b842b1d609bce8 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Fri, 17 Jul 2020 19:02:30 -0700 Subject: [PATCH] x86: gen_gdt: improve docstring Describe what info we're snarfing out of the prebuilt kernel. Signed-off-by: Andrew Boie --- arch/x86/gen_gdt.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/gen_gdt.py b/arch/x86/gen_gdt.py index 70fe90adb41c74..32124156de6ec8 100755 --- a/arch/x86/gen_gdt.py +++ b/arch/x86/gen_gdt.py @@ -16,6 +16,15 @@ these data structures will not disturb the memory addresses of other symbols. +The input kernel ELF binary is used to obtain the following +information: + +- Memory addresses of the Main and Double Fault TSS structures + so GDT descriptors can be created for them +- Memory addresses of where the GDT lives in memory, so that this + address can be populated in the GDT pseudo descriptor +- whether userspace or HW stack protection are enabled in Kconfig + The output is a GDT whose contents depend on the kernel configuration. With no memory protection features enabled, we generate flat 32-bit code and data segments. If hardware-