]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge branch 'x86/pti-urgent' into x86/pti
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Aug 2018 18:56:34 +0000 (20:56 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 6 Aug 2018 18:56:34 +0000 (20:56 +0200)
Integrate the PTI Global bit fixes which conflict with the 32bit PTI
support.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1  2 
arch/x86/mm/init_64.c
arch/x86/mm/pti.c

index 9b19f9a8948ecef8601af7c036361a8757385c3f,68c292cb1ebfb2ab5b596ede52fe90926b872945..dd519f3721692180b3aac7f5e8eeda52a1d68226
@@@ -1283,14 -1283,16 +1283,10 @@@ void mark_rodata_ro(void
        set_memory_ro(start, (end-start) >> PAGE_SHIFT);
  #endif
  
-       free_init_pages("unused kernel",
-                       (unsigned long) __va(__pa_symbol(text_end)),
-                       (unsigned long) __va(__pa_symbol(rodata_start)));
-       free_init_pages("unused kernel",
-                       (unsigned long) __va(__pa_symbol(rodata_end)),
-                       (unsigned long) __va(__pa_symbol(_sdata)));
+       free_kernel_image_pages((void *)text_end, (void *)rodata_start);
+       free_kernel_image_pages((void *)rodata_end, (void *)_sdata);
  
        debug_checkwx();
 -
 -      /*
 -       * Do this after all of the manipulation of the
 -       * kernel text page tables are complete.
 -       */
 -      pti_clone_kernel_text();
  }
  
  int kern_addr_valid(unsigned long addr)
index bcf35dac19203d1df13160a040a1a9bc48fa11db,8d88d067b3d75a6782a6614a47c772e5dbbb6382..ef8db6ffc836e6cf26d26c6e60be00604e76b90e
@@@ -481,7 -453,8 +488,8 @@@ static void pti_clone_kernel_text(void
         * clone the areas past rodata, they might contain secrets.
         */
        unsigned long start = PFN_ALIGN(_text);
-       unsigned long end = (unsigned long)__end_rodata_aligned;
 -      unsigned long end_clone  = (unsigned long)__end_rodata_hpage_align;
++      unsigned long end_clone  = (unsigned long)__end_rodata_aligned;
+       unsigned long end_global = PFN_ALIGN((unsigned long)__stop___ex_table);
  
        if (!pti_kernel_image_global_ok())
                return;