x86/entry: Entry/exception code rework, syscall and KVM changes
Status from this message: The following commit has been merged into the x86/entry branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | x86/entry/64: Move non entry code into .text sectionarch/ arch/ | +11 | 4 replies | |
| 2/18 | x86/entry/32: Move non entry code into .text sectionarch/ | +10 | 2 replies | |
| 3/18 | x86/entry: Mark enter_from_user_mode() noinstrarch/ | +1 | 1 reply | |
| 4/18 | x86/entry/common: Protect against instrumentationarch/ | +90 | 2 replies | |
| 5/18 | x86/entry: Move irq tracing on syscall entry to C-codearch/ arch/ arch/ +1 more | +19 | 4 replies | |
| 6/18 | x86/entry: Move irq flags tracing to prepare_exit_to_usermode()arch/ arch/ arch/ +1 more | +27 | 2 replies | |
| 7/18 | context_tracking: Ensure that the critical path cannot be instrumentedinclude/ include/ kernel/ | +14 | 1 reply | |
| 8/18 | lib/smp_processor_id: Move it into noinstr sectionlib/ | +5 | 0 replies | |
| 9/18 | x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inlinearch/ | +2 | 0 replies | |
| 10/18 | x86/entry/64: Check IF in __preempt_enable_notrace() thunkarch/ arch/ arch/ | +25 | 8 replies | |
| 11/18 | x86/entry/64: Mark ___preempt_schedule_notrace() thunk noinstrarch/ | +16 | 0 replies | |
| 12/18 | x86,objtool: Make entry_64_compat.S objtool cleanarch/ arch/ | +20 | 2 replies | |
| 13/18 | x86/kvm: Move context tracking where it belongsarch/ arch/ arch/ | +26 | 3 replies | |
| 14/18 | x86/kvm/vmx: Add hardirq tracing to guest enter/exitarch/ | +23 | 1 reply | |
| 15/18 | x86/kvm/svm: Handle hardirqs proper on guest enter/exitarch/ | +25 | 6 replies | |
| 16/18 | context_tracking: Make guest_enter/exit() .noinstr readyinclude/ | +16 | 0 replies | |
| 17/18 | x86/kvm/vmx: Move guest enter/exit into .noinstr.textarch/ arch/ arch/ +3 more | +79 | 1 reply | |
| 18/18 | x86/kvm/svm: Move guest enter/exit into .noinstr.textarch/ arch/ | +57 | 2 replies |
Reviews trailers per patch
9 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Paolo Bonzini | Alexandre Chartre | Steven Rostedt (VMware) | Masami Hiramatsu | Andy Lutomirski |
|---|---|---|---|---|---|
| 1/18 | R-b | ||||
| 2/18 | |||||
| 3/18 | R-b | ||||
| 4/18 | |||||
| 5/18 | |||||
| 6/18 | A-b | ||||
| 7/18 | R-b | ||||
| 8/18 | |||||
| 9/18 | |||||
| 10/18 | |||||
| 11/18 | |||||
| 12/18 | A-b | ||||
| 13/18 | A-b | ||||
| 14/18 | A-b | ||||
| 15/18 | |||||
| 16/18 | |||||
| 17/18 | A-b | ||||
| 18/18 | A-b | R-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 5 reviewers.
Cover letter [patch V4 part 2 00/18] x86/entry: Entry/exception code rework, syscall and KVM changes
Folks!
This is the second part of the rework series. Part 1 can be found here:
https://lore.kernel.org/r/[email protected]
The series has a total of 138 patches and is split into 5 parts. The base for this series is:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v4-part-1
The full series with all parts applied is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v4-part-5
The second part, i.e. this series is available from:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v4-part-2
This part contains the modifications for the syscall entry code and the adjustment of the KVM code:
- Move the non entry related ASM code into the regular text section so it is not part of the protected section
- Move the low level entry C code into the .noinstr.text section
- Make the interaction with lockdep, RCU and tracing correct
- Move the KVM guest_enter/exit() handling strict vs. RCU and instrumentation protection. It's more or less the same problem as the syscall entry/exit and needs to be equally restrictive so that the rules can be enforced with objtool.
The objtool check for the noinstr.text correctness is not yet added to the build machinery and has to be invoked manually for now:
objtool check -fal vmlinux.o
The checking only works for builtin code as objtool cannot do a combined analysis of vmlinux.o and a module.o
Thanks,
tglx
8<----------
arch/x86/entry/Makefile | 2 arch/x86/entry/common.c | 173 ++++++++++++++++++++++++--------- arch/x86/entry/entry_32.S | 35 ++---- arch/x86/entry/entry_64.S | 16 +-- arch/x86/entry/entry_64_compat.S | 55 ++++------ arch/x86/entry/thunk_64.S | 45 +++++++- arch/x86/include/asm/hardirq.h | 4 arch/x86/include/asm/irqflags.h | 3 arch/x86/include/asm/kvm_host.h | 8 + arch/x86/include/asm/nospec-branch.h | 4 arch/x86/include/asm/paravirt.h | 3 arch/x86/kernel/ftrace_64.S | 2 arch/x86/kvm/svm/svm.c | 66 ++++++++++-- arch/x86/kvm/svm/vmenter.S | 2 arch/x86/kvm/vmx/ops.h | 4 arch/x86/kvm/vmx/vmenter.S | 5 arch/x86/kvm/vmx/vmx.c | 78 +++++++++++--- arch/x86/kvm/x86.c | 4 include/linux/context_tracking.h | 27 +++-- include/linux/context_tracking_state.h | 6 - kernel/context_tracking.c | 14 +- lib/smp_processor_id.c | 10 - 22 files changed, 391 insertions(+), 175 deletions(-)