]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/kernel/vmlinux.lds.S
ARM: KVM: enforce maximum size for identity mapped code
[karo-tx-linux.git] / arch / arm / kernel / vmlinux.lds.S
index b571484e9f0388133429cde749c96cee3d1dfb47..a871b8e00fca7d67141859bbb2415dadabbc1ad5 100644 (file)
@@ -20,7 +20,7 @@
        VMLINUX_SYMBOL(__idmap_text_start) = .;                         \
        *(.idmap.text)                                                  \
        VMLINUX_SYMBOL(__idmap_text_end) = .;                           \
-       ALIGN_FUNCTION();                                               \
+       . = ALIGN(32);                                                  \
        VMLINUX_SYMBOL(__hyp_idmap_text_start) = .;                     \
        *(.hyp.idmap.text)                                              \
        VMLINUX_SYMBOL(__hyp_idmap_text_end) = .;
@@ -315,3 +315,8 @@ SECTIONS
  */
 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
+/*
+ * The HYP init code can't be more than a page long.
+ * The above comment applies as well.
+ */
+ASSERT(((__hyp_idmap_text_end - __hyp_idmap_text_start) <= PAGE_SIZE), "HYP init code too big")