Makes KPTI KABI compatible.
Orabug:
27333760
CVE: CVE-2017-5754
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
} ____cacheline_aligned;
+#ifndef __GENKSYMS__
DECLARE_PER_CPU_SHARED_ALIGNED_USER_MAPPED(struct tss_struct, cpu_tss);
+#else
+DECLARE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss);
+#endif
#ifdef CONFIG_X86_32
DECLARE_PER_CPU(unsigned long, cpu_current_top_of_stack);
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
+#ifndef __GENKSYMS__
__visible DEFINE_PER_CPU_SHARED_ALIGNED_USER_MAPPED(struct tss_struct, cpu_tss) = {
+#else
+__visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
+#endif
.x86_tss = {
.sp0 = TOP_OF_INIT_STACK,
#ifdef CONFIG_X86_32
NR_SLAB_RECLAIMABLE,
NR_SLAB_UNRECLAIMABLE,
NR_PAGETABLE, /* used for pagetables */
- /* Second 128 byte cacheline */
NR_KERNEL_STACK,
+ /* Second 128 byte cacheline */
+#ifndef __GENKSYMS__
NR_KAISERTABLE,
+#endif
NR_UNSTABLE_NFS, /* NFS unstable pages */
NR_BOUNCE,
NR_VMSCAN_WRITE,
"nr_slab_unreclaimable",
"nr_page_table_pages",
"nr_kernel_stack",
+#ifndef __GENKSYMS__
"nr_overhead",
+#endif
"nr_unstable",
"nr_bounce",
"nr_vmscan_write",