Skip to content

x86/tlb: Unexport per-CPU tlbstate

Thomas Gleixner lkml 2 versions – Applied

Status from this message: The following commit has been merged into the x86/mm branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 1 replyApplied
  2. v115 patches 18 repliesSuperseded

Changes in v2 from the cover letter

- Reduced the number of exports by uninlining __flush_tlb_all() (Christoph)

- Addressed fallout reported by 0-day

- Picked up acks/reviewed tags

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/16x86/tlb: Uninline __get_current_cr3_fast()arch/x86/include/asm/mmu_context.h arch/x86/mm/tlb.c+21 -181 reply
2/16x86/cpu: Uninline CR4 accessorsarch/x86/include/asm/tlbflush.h arch/x86/kernel/cpu/common.c arch/x86/kernel/process.c+40 -320 replies
3/16x86/cr4: Sanitize CR4.PCE updatearch/x86/events/core.c arch/x86/include/asm/mmu_context.h arch/x86/mm/tlb.c+25 -220 replies
4/16x86/alternatives: Move temporary_mm helpers into Carch/x86/include/asm/mmu_context.h arch/x86/kernel/alternative.c+55 -550 replies
5/16x86/tlb: Move __flush_tlb() out of linearch/x86/include/asm/paravirt.h arch/x86/include/asm/tlbflush.h arch/x86/kernel/cpu/mtrr/generic.c +4 more+45 -360 replies
6/16x86/tlb: Move __flush_tlb_global() out of linearch/x86/include/asm/paravirt.h arch/x86/include/asm/tlbflush.h arch/x86/kernel/paravirt.c +1 more+44 -450 replies
7/16x86/tlb: Move __flush_tlb_one_user() out of linearch/x86/include/asm/paravirt.h arch/x86/include/asm/tlbflush.h arch/x86/kernel/paravirt.c +2 more+59 -580 replies
8/16x86/tlb: Move __flush_tlb_one_kernel() out of linearch/x86/include/asm/pgtable_32.h arch/x86/include/asm/tlbflush.h arch/x86/mm/init_64.c +5 more+40 -470 replies
9/16x86/tlb: Move flush_tlb_others() out of linearch/x86/include/asm/paravirt.h arch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+17 -100 replies
10/16x86/tlb: Move __flush_tlb_all() out of linearch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+23 -290 replies
11/16x86/tlb: Move paravirt_tlb_remove_table() to the usage sitearch/x86/include/asm/tlbflush.h arch/x86/mm/pgtable.c+8 -50 replies
12/16x86/tlb: Move cr4_set_bits_and_update_boot() to the usage sitearch/x86/include/asm/tlbflush.h arch/x86/mm/init.c+13 -140 replies
13/16x86/tlb: Uninline nmi_uaccess_okay()arch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+33 -320 replies
14/16x86/tlb: Move PCID helpers where they are usedarch/x86/include/asm/tlbflush.h arch/x86/mm/tlb.c+126 -1270 replies
15/16xen/privcmd: Remove unneeded asm/tlb.h includedrivers/xen/privcmd.c+0 -10 replies
16/16x86/tlb: Restrict access to tlbstatearch/x86/include/asm/tlbflush.h arch/x86/mm/init.c+49 -480 replies

Reviews trailers per patch

15 of 16 patches have a Reviewed-by or Acked-by.

PatchAlexandre ChartrePeter Zijlstra (Intel)Andy Lutomirski
1/16R-b A-b A-b
2/16R-b A-b
3/16R-b A-b
4/16R-b A-b
5/16R-b A-b
6/16R-b A-b
7/16R-b A-b
8/16R-b A-b
9/16R-b A-b
10/16
11/16R-b A-b
12/16R-b A-b
13/16R-b A-b
14/16R-b A-b
15/16R-b A-b
16/16R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [patch V2 00/16] x86/tlb: Unexport per-CPU tlbstate

The per-CPU tlbstate contains sensitive information which should be really only accessible in core code. It is exported to modules because some inline functions which are required by KVM need access to it.

The first version can be found here:

    https://lore.kernel.org/r/[email protected]

Changes vs. V1:

- Reduced the number of exports by uninlining __flush_tlb_all() (Christoph)

- Addressed fallout reported by 0-day

- Picked up acks/reviewed tags

I left the LKDTM part alone for now and decided to keep the __flush_tlb_all() export for SVM as moving that errata handling to builtin code would required two exports in turn.

The series is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel x86/tlb

Thanks,

tglx

8<-----------------

 arch/x86/events/core.c             |   11 
 arch/x86/include/asm/mmu_context.h |   88 -------
 arch/x86/include/asm/paravirt.h    |   12 -
 arch/x86/include/asm/pgtable_32.h  |    2 
 arch/x86/include/asm/tlbflush.h    |  441 +++----------------------------------
 arch/x86/kernel/alternative.c      |   55 ++++
 arch/x86/kernel/cpu/common.c       |   25 ++
 arch/x86/kernel/cpu/mtrr/generic.c |    4 
 arch/x86/kernel/paravirt.c         |   21 -
 arch/x86/kernel/process.c          |   11 
 arch/x86/mm/init.c                 |   14 +
 arch/x86/mm/init_64.c              |    2 
 arch/x86/mm/ioremap.c              |    2 
 arch/x86/mm/kmmio.c                |    2 
 arch/x86/mm/mem_encrypt.c          |    2 
 arch/x86/mm/pat/set_memory.c       |    2 
 arch/x86/mm/pgtable.c              |    8 
 arch/x86/mm/pgtable_32.c           |    2 
 arch/x86/mm/tlb.c                  |  384 +++++++++++++++++++++++++++++++-
 arch/x86/platform/uv/tlb_uv.c      |    4 
 drivers/xen/privcmd.c              |    1 
 21 files changed, 556 insertions(+), 537 deletions(-)