Skip to content

objtool/x86: noinstr vs PARAVIRT

Peter Zijlstra lkml 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest24 patches 40 repliesApplied
  2. v1 RFC18 patches 1 replyApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/24x86/xen: Mark cpu_bringup_and_idle() as dead_end_functiontools/objtool/check.c+1 -08 replies
2/24objtool: Introduce CFI hashtools/objtool/arch/x86/decode.c tools/objtool/check.c tools/objtool/include/objtool/cfi.h +2 more+154 -247 replies
3/24objtool: Handle __sanitize_cov*() tail callstools/objtool/arch/x86/decode.c tools/objtool/check.c tools/objtool/include/objtool/arch.h+100 -747 replies
4/24x86/kvm: Always inline sev_*guest()arch/x86/kvm/svm/svm.h+3 -30 replies
5/24x86/kvm: Always inline vmload() / vmsave()arch/x86/kvm/svm/svm_ops.h+2 -20 replies
6/24x86: Always inline context_tracking_guest_enter()include/linux/context_tracking.h+1 -15 replies
7/24x86/kvm: Always inline to_svm()arch/x86/kvm/svm/svm.h+1 -10 replies
8/24x86/kvm: Always inline evmcs_write64()arch/x86/kvm/vmx/evmcs.h+2 -20 replies
9/24x86: Always inline ip_within_syscall_gap()arch/x86/include/asm/ptrace.h+1 -10 replies
10/24x86/sev: Fix noinstr for vc_ghcb_invalidate()arch/x86/kernel/sev-shared.c+1 -10 replies
11/24locking/lockdep: Avoid RCU-induced noinstr failkernel/locking/lockdep.c+1 -10 replies
12/24x86/paravirt: Mark arch_local_irq_*() __always_inlinearch/x86/include/asm/paravirt.h+4 -41 reply
13/24x86/paravirt: Use PVOP_* for paravirt callsarch/x86/include/asm/paravirt.h+4 -41 reply
14/24x86/xen: Make read_cr2() noinstrarch/x86/include/asm/paravirt.h arch/x86/kernel/paravirt.c arch/x86/xen/xen-asm.S+9 -21 reply
15/24x86/xen: Make write_cr2() noinstrarch/x86/include/asm/paravirt.h arch/x86/kernel/paravirt.c arch/x86/xen/mmu_pv.c+9 -31 reply
16/24x86/xen: Make get_debugreg() noinstrarch/x86/include/asm/paravirt.h arch/x86/include/asm/xen/hypercall.h arch/x86/kernel/paravirt.c +1 more+9 -51 reply
17/24x86/xen: Make set_debugreg() noinstrarch/x86/include/asm/paravirt.h arch/x86/include/asm/xen/hypercall.h arch/x86/kernel/paravirt.c +1 more+9 -61 reply
18/24x86/xen: Make save_fl() noinstrarch/x86/include/asm/paravirt.h arch/x86/kernel/irqflags.S arch/x86/xen/irq.c +1 more+25 -201 reply
19/24x86/xen: Make hypercall_page noinstrarch/x86/xen/xen-head.S+1 -11 reply
20/24x86/xen: Make irq_enable() noinstrarch/x86/kernel/paravirt.c arch/x86/xen/irq.c arch/x86/xen/xen-asm.S+36 -311 reply
21/24x86/xen: Make irq_disable() noinstrarch/x86/kernel/paravirt.c arch/x86/xen/irq.c arch/x86/xen/xen-asm.S+9 -51 reply
22/24x86/xen: Mark xen_force_evtchn_callback() noinstrarch/x86/include/asm/xen/hypercall.h arch/x86/xen/irq.c+2 -21 reply
23/24x86/xen: Rework the xen_{cpu,irq,mmu}_ops[] arraysarch/x86/xen/enlighten_pv.c arch/x86/xen/irq.c arch/x86/xen/mmu_pv.c+91 -841 reply
24/24objtool: Support pv_opsindirect calls for noinstrlib/Kconfig.debug tools/objtool/arch/x86/decode.c tools/objtool/check.c +4 more+208 -130 replies

Reviews trailers per patch

14 of 24 patches have a Reviewed-by or Acked-by.

PatchJuergen GrossMarco ElverMiroslav Benes
1/24R-b R-b R-b
2/24
3/24A-b
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24R-b
13/24R-b
14/24R-b
15/24R-b
16/24R-b
17/24R-b
18/24R-b
19/24R-b
20/24R-b
21/24R-b
22/24R-b
23/24R-b
24/24

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/24] objtool/x86: noinstr vs PARAVIRT

Hi,

Per long standing request from Thomas, this makes the noinstr validation work with PARAVIRT=y.

It isn't exactly pretty, but it does work.

With all this on top of tip/master (which includes some of the previous round), all (*) the robots seem to get is endless garbage like:

vmlinux.o: warning: objtool: __rdgsbase_inactive()+0x24: call to ftrace_likely_update() leaves .noinstr.text section

And my secret plan is to pull the KPTI CR3 swizzling into C such that all that will insta explode and become unfixable.

Steve, can I please delete TRACE_BRANCH_PROFILING and PROFILE_ALL_BRANCHES already?

(*) there were also a few reports from 0day running out of memory.