public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.15 v2 0/3] Support static calls with LLVM-built kernels
@ 2024-03-18 13:39 Thadeu Lima de Souza Cascardo
  2024-03-18 13:39 ` [PATCH 5.15 v2 1/3] x86/alternatives: Introduce int3_emulate_jcc() Thadeu Lima de Souza Cascardo
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2024-03-18 13:39 UTC (permalink / raw)
  To: stable; +Cc: Peter Zijlstra, Thomas Gleixner, Ingo Molnar, kernel-dev

Otherwise, we see warnings like this:

[    0.000000][    T0] ------------[ cut here ]------------
[    0.000000][    T0] unexpected static_call insn opcode 0xf at kvm_vcpu_reload_apic_access_page+0x17/0x30
[    0.000000][    T0] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/static_call.c:88 __static_call_validate+0x68/0x70
[    0.000000][    T0] Modules linked in:
[    0.000000][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.151-00083-gf200c7260296 #68 fe3cb25cf78cb710722bb5acd1cadddd35172924
[    0.000000][    T0] RIP: 0010:__static_call_validate+0x68/0x70
[    0.000000][    T0] Code: 0f b6 4a 04 81 f1 c0 00 00 00 09 c1 74 cc 80 3d be 2c 02 02 00 75 c3 c6 05 b5 2c 02 02 01 48 c7 c7 38 4f c3 82 e8 e8 c8 09 00 <0f> 0b c3 00 00 cc cc 00 53 48 89 fb 48 63 15 31 71 06 02
e8 b0 b8
[    0.000000][    T0] RSP: 0000:ffffffff82e03e70 EFLAGS: 00010046 ORIG_RAX: 0000000000000000
[    0.000000][    T0] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002
[    0.000000][    T0] RDX: 0000000000000000 RSI: ffffffff82e03ce0 RDI: 0000000000000001
[    0.000000][    T0] RBP: 0000000000000001 R08: 00000000ffffffff R09: ffffffff82eaab70
[    0.000000][    T0] R10: ffffffff82e2e900 R11: 205d305420202020 R12: ffffffff82e51960
[    0.000000][    T0] R13: ffffffff81038987 R14: ffffffff81038987 R15: 0000000000000001
[    0.000000][    T0] FS:  0000000000000000(0000) GS:ffffffff83726000(0000) knlGS:0000000000000000
[    0.000000][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000][    T0] CR2: ffff888000014be8 CR3: 00000000037b2000 CR4: 00000000000000a0
[    0.000000][    T0] Call Trace:
[    0.000000][    T0]  <TASK>
[    0.000000][    T0]  ? __warn+0x75/0xe0
[    0.000000][    T0]  ? report_bug+0x81/0xe0
[    0.000000][    T0]  ? kvm_vcpu_reload_apic_access_page+0x17/0x30
[    0.000000][    T0]  ? kvm_vcpu_reload_apic_access_page+0x17/0x30
[    0.000000][    T0]  ? early_fixup_exception+0x44/0xa0
[    0.000000][    T0]  ? early_idt_handler_common+0x2f/0x40
[    0.000000][    T0]  ? kvm_vcpu_reload_apic_access_page+0x17/0x30
[    0.000000][    T0]  ? kvm_vcpu_reload_apic_access_page+0x17/0x30
[    0.000000][    T0]  ? __static_call_validate+0x68/0x70
[    0.000000][    T0]  ? arch_static_call_transform+0x5c/0x90
[    0.000000][    T0]  ? __static_call_init+0x1ec/0x230
[    0.000000][    T0]  ? static_call_init+0x32/0x70
[    0.000000][    T0]  ? setup_arch+0x36/0x4f0
[    0.000000][    T0]  ? start_kernel+0x67/0x400
[    0.000000][    T0]  ? secondary_startup_64_no_verify+0xb1/0xbb
[    0.000000][    T0]  </TASK>
[    0.000000][    T0] ---[ end trace 8c8589c01f370686 ]---



Peter Zijlstra (3):
  x86/alternatives: Introduce int3_emulate_jcc()
  x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions
  x86/static_call: Add support for Jcc tail-calls

 arch/x86/include/asm/text-patching.h | 31 +++++++++++++++
 arch/x86/kernel/alternative.c        | 56 +++++++++++++++++++++++-----
 arch/x86/kernel/kprobes/core.c       | 38 ++++---------------
 arch/x86/kernel/static_call.c        | 49 ++++++++++++++++++++++--
 4 files changed, 132 insertions(+), 42 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-30 18:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 13:39 [PATCH 5.15 v2 0/3] Support static calls with LLVM-built kernels Thadeu Lima de Souza Cascardo
2024-03-18 13:39 ` [PATCH 5.15 v2 1/3] x86/alternatives: Introduce int3_emulate_jcc() Thadeu Lima de Souza Cascardo
2024-03-18 13:39 ` [PATCH 5.15 v2 2/3] x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions Thadeu Lima de Souza Cascardo
2024-03-18 13:39 ` [PATCH 5.15 v2 3/3] x86/static_call: Add support for Jcc tail-calls Thadeu Lima de Souza Cascardo
2024-03-29 12:50 ` [PATCH 5.15 v2 0/3] Support static calls with LLVM-built kernels Greg KH
2024-03-30  9:57   ` Thadeu Lima de Souza Cascardo
2024-03-30 10:11     ` Greg KH
2024-03-30 18:10       ` Thadeu Lima de Souza Cascardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox