jump_label, objtool, IBRS and IBPB
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest35 patches 29 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/35 | jump_label: Add branch hints to static_branch_{un,}likely()include/ | +2 | 0 replies | |
| 2/35 | sched: Optimize ttwu_stat()kernel/ kernel/ | +10 | 0 replies | |
| 3/35 | x86: Reindent _static_cpu_hasarch/ | +39 | 0 replies | |
| 4/35 | x86: Update _static_cpu_has to use all named variablesarch/ | +5 | 0 replies | |
| 5/35 | x86: Add a type field to alt_instrarch/ arch/ arch/ +1 more | +10 | 0 replies | |
| 6/35 | objtool: Implement base jump_assert supporttools/ tools/ | +69 | 0 replies | |
| 7/35 | x86: Annotate static_cpu_has alternativearch/ arch/ | +4 | 0 replies | |
| 8/35 | objtool: Implement jump_assert for _static_cpu_has()tools/ tools/ tools/ | +37 | 0 replies | |
| 9/35 | objtool: Introduce special_typetools/ tools/ tools/ | +26 | 0 replies | |
| 10/35 | x86/jump_label: Implement arch_static_assert()arch/ | +23 | 0 replies | |
| 11/35 | objtool: Add retpoline validationscripts/ tools/ tools/ +2 more | +98 | 0 replies | |
| 12/35 | x86/paravirt: Annotate indirect callsarch/ arch/ | +24 | 0 replies | |
| 13/35 | x86,nospec: Annotate indirect calls/jumpsarch/ | +16 | 0 replies | |
| 14/35 | x86: Annotate indirect jump in head_64.Sarch/ | +2 | 0 replies | |
| 15/35 | objtool: More complex static jump implementationtools/ tools/ | +42 | 0 replies | |
| 16/35 | objtool: Use existing global variables for optionstools/ tools/ tools/ +2 more | +10 | 0 replies | |
| 17/35 | objtool: Even more complex static block checkstools/ tools/ | +61 | 0 replies | |
| 18/35 | objtool: Another static block failtools/ tools/ | +33 | 3 replies | |
| 19/35 | objtool: Skip static assert when KCOV/KASANscripts/ tools/ tools/ +1 more | +15 | 0 replies | |
| 20/35 | x86: Force asm-gotoMakefile arch/ | +11 | 1 reply | |
| 21/35 | x86: Remove FAST_FEATURE_TESTSarch/ arch/ | +0 | 0 replies | |
| 22/35 | x86/cpufeatures: Detect Speculation control featurearch/ arch/ arch/ | +7 | 0 replies | |
| 23/35 | x86/speculation: Add basic speculation control codeDocumentation/ arch/ arch/ +2 more | +64 | 11 replies | |
| 24/35 | x86/msr: Move native_*msr macros out of microcode.harch/ arch/ | +18 | 0 replies | |
| 25/35 | x86/speculation: Add inlines to control Indirect Branch Speculationarch/ | +12 | 0 replies | |
| 26/35 | x86/enter: Create macros to stop/restart Indirect Branch Speculationarch/ | +73 | 1 reply | |
| 27/35 | x86/enter: Use IBRS on syscall and interruptsarch/ arch/ | +53 | 0 replies | |
| 28/35 | x86/idle: Control Indirect Branch Speculation in idlearch/ arch/ | +28 | 1 reply | |
| 29/35 | x86/speculation: Add IPBP supportarch/ arch/ arch/ +2 more | +26 | 4 replies | |
| 30/35 | x86/speculation: Use Indirect Branch Prediction Barrier in context switcharch/ | +9 | 3 replies | |
| 31/35 | x86/ibrs: Add new helper macros to save/restore MSR_IA32_SPEC_CTRLarch/ | +18 | 0 replies | |
| 32/35 | x86/vmx: Direct access to MSR_IA32_SPEC_CTRLarch/ arch/ arch/ | +28 | 0 replies | |
| 33/35 | x86/svm: Direct access to MSR_IA32_SPEC_CTRLarch/ | +13 | 0 replies | |
| 34/35 | x86/kvm: Add IBPB supportarch/ arch/ | +16 | 5 replies | |
| 35/35 | x86/nospec: Add static assertionsarch/ | +15 | 0 replies |
Reviews trailers per patch
1 of 35 patches has a Reviewed-by or Acked-by.
| Patch | Borislav Petkov | David Woodhouse | Josh Poimboeuf | Tim Chen |
|---|---|---|---|---|
| 1/35 | ||||
| 2/35 | ||||
| 3/35 | R-b | |||
| 4/35 | Requested-by | |||
| 5/35 | ||||
| 6/35 | ||||
| 7/35 | ||||
| 8/35 | ||||
| 9/35 | ||||
| 10/35 | ||||
| 11/35 | Requested-by | |||
| 12/35 | ||||
| 13/35 | ||||
| 14/35 | ||||
| 15/35 | ||||
| 16/35 | ||||
| 17/35 | ||||
| 18/35 | ||||
| 19/35 | ||||
| 20/35 | ||||
| 21/35 | ||||
| 22/35 | ||||
| 23/35 | ||||
| 24/35 | ||||
| 25/35 | ||||
| 26/35 | ||||
| 27/35 | ||||
| 28/35 | Originally-by | |||
| 29/35 | ||||
| 30/35 | ||||
| 31/35 | ||||
| 32/35 | ||||
| 33/35 | ||||
| 34/35 | ||||
| 35/35 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 00/35] jump_label, objtool, IBRS and IBPB
Lots of patches..
They include:
- objtool validation of jump_label/static_cpu_has
Allows asserting that the code block following a jump_label/static_cpu_has is indeed unconditional. Ensures GCC doesn't generate particularly stupid code which would re-insert a dynamic test.
- objtool validation of retpoline
Looks for indirect JMP/CALL sites when build with a retpoline enabled compiler. Has already spotted a bunch of sites that need fixing, see below.
- makes x86 hard rely on asm-goto to ensure we can indeed use static_cpu_has to avoid dynamic branches (and thus speculation).
- The IBRS/IBPB patches from Thomas that use static_cpu_has()
These hard rely on the above; we must not speculate across the IBRS/IBPB MSR writes otherwise that would totally defeat the point. Prior patches had LFENCE crud in the else-clause, which then makes the primitives unconditionally expensive.
- Rebased the IBRS/IBPB-KVM patches from Ashok on top
- Random odd fixes for various things encountered while doing the above.
Please have a look and sorry for this many patches.
---
Output of a x86_64-allmodconfig -KCOV -KASAN build:
arch/x86/entry/.tmp_entry_64.o: warning: objtool: .entry.text+0x1cb2: indirect call found in RETPOLINE build arch/x86/entry/.tmp_entry_64.o: warning: objtool: .entry.text+0x1cc7: indirect call found in RETPOLINE build arch/x86/hyperv/.tmp_mmu.o: warning: objtool: hyperv_flush_tlb_others()+0x30c: indirect call found in RETPOLINE build arch/x86/hyperv/.tmp_mmu.o: warning: objtool: hyperv_flush_tlb_others()+0x3b0: indirect call found in RETPOLINE build arch/x86/hyperv/.tmp_mmu.o: warning: objtool: hyperv_flush_tlb_others_ex()+0x3a1: indirect call found in RETPOLINE build arch/x86/hyperv/.tmp_mmu.o: warning: objtool: hyperv_flush_tlb_others_ex()+0x45c: indirect call found in RETPOLINE build arch/x86/xen/.tmp_multicalls.o: warning: objtool: xen_mc_flush()+0x1da: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_emulate.o: warning: objtool: fastop()+0x54: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_emulate.o: warning: objtool: em_loop()+0xcc: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_emulate.o: warning: objtool: x86_emulate_insn()+0xbd6: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_emulate.o: warning: objtool: x86_emulate_insn()+0xc1a: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_emulate.o: warning: objtool: x86_emulate_insn()+0xc66: indirect call found in RETPOLINE build arch/x86/kvm/.tmp_vmx.o: warning: objtool: vmx_handle_external_intr()+0x50: indirect call found in RETPOLINE build arch/x86/mm/.tmp_mem_encrypt_boot.o: warning: objtool: sme_encrypt_execute()+0x48: indirect call found in RETPOLINE build drivers/hv/.tmp_hv.o: warning: objtool: hv_post_message()+0x72: indirect call found in RETPOLINE build drivers/hv/.tmp_connection.o: warning: objtool: vmbus_set_event()+0x33: indirect call found in RETPOLINE build drivers/pci/host/.tmp_pci-hyperv.o: warning: objtool: hv_irq_unmask()+0x22b: indirect call found in RETPOLINE build drivers/xen/.tmp_privcmd.o: warning: objtool: privcmd_ioctl()+0xcf: indirect call found in RETPOLINE build drivers/watchdog/.tmp_hpwdt.o: warning: objtool: .text+0x24: indirect call found in RETPOLINE build