]> xenbits.xensource.com Git - xen.git/commit
x86/xpti: really hide almost all of Xen image
authorJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2018 15:46:27 +0000 (16:46 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2018 15:46:27 +0000 (16:46 +0100)
commitd1d6fc97d66cf56847fc0bcc2ddc370707c22378
treee72772cb5d1cd07bbadb8df414442eec513a48c3
parentefe55d070b7d3bb5c56c832e6c48441c31ac6bc6
x86/xpti: really hide almost all of Xen image

Commit 422588e885 ("x86/xpti: Hide almost all of .text and all
.data/.rodata/.bss mappings") carefully limited the Xen image cloning to
just entry code, but then overwrote the just allocated and populated L3
entry with the normal one again covering both Xen image and stubs.

Drop the respective code in favor of an explicit clone_mapping()
invocation. This in turn now requires setup_cpu_root_pgt() to run after
stub setup in all cases. Additionally, with (almost) no unintended
mappings left, the BSP's IDT now also needs to be page aligned.

The moving ahead of cleanup_cpu_root_pgt() is not strictly necessary
for functionality, but things are more logical this way, and we retain
cleanup being done in the inverse order of setup.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/smpboot.c
xen/arch/x86/traps.c