On Wed, 16 Jan 2019 13:35:58 +0000 Sasha Levin <sashal@xxxxxxxxxx> wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: 9326638cbee2 kprobes, x86: Use NOKPROBE_SYMBOL() instead of __kprobes annotation. > > The bot has tested the following trees: v4.20.2, v4.19.15, v4.14.93, v4.9.150, v4.4.170, v3.18.132. > > v4.20.2: Build OK! > v4.19.15: Build OK! > v4.14.93: Build OK! > v4.9.150: Build failed! Errors: > ./include/linux/kprobes.h:494:22: error: initializer element is not constant > ./include/linux/kprobes.h:494:22: error: initializer element is not constant > ./include/linux/kprobes.h:494:22: error: initializer element is not constant > ./include/linux/kprobes.h:494:22: error: initializer element is not constant Ah, this is related to commit 54a7d50b9205 ("x86: mark kprobe templates as character arrays, not single characters") Before this change, I used & optprobe_template_*, so it the patch should be +NOKPROBE_SYMBOL(optprobe_template_func); +NOKPROBE_SYMBOL(&optprobe_template_entry); +NOKPROBE_SYMBOL(&optprobe_template_val); +NOKPROBE_SYMBOL(&optprobe_template_call); +NOKPROBE_SYMBOL(&optprobe_template_end); (since optprobe_template_func is a function symbol, it doesn't need &) > > v4.4.170: Failed to apply! Possible dependencies: > 21266be9ed54 ("arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug") > 44a95dae1d22 ("KVM: x86: Detect and Initialize AVIC support") > 520040146a0a ("KVM: x86: Use vector-hashing to deliver lowest-priority interrupts") > 5881f73757cc ("svm: Introduce AMD IOMMU avic_ga_log_notifier") > 5c919412fe61 ("kvm/x86: Hyper-V synthetic interrupt controller") > 6308630bd3db ("kvm/x86: split ioapic-handled and EOI exit bitmaps") > c0dd671686b2 ("objtool: Mark non-standard object files and directories") > c207aee48037 ("objtool, x86: Add several functions and files to the objtool whitelist") > c6d308534aef ("UBSAN: run-time undefined behavior sanity checker") > d62caabb41f3 ("kvm/x86: per-vcpu apicv deactivation support") > f876f440df39 ("crypto: sha256-mb - SHA256 multibuffer job manager and glue code") OK, commit 935893a17a99 ("objtool, x86: Add several functions and files to the objtool whitelist") introduced optprobe_template_func, so for v4.4.X and v3.18.X, we don't need the first line. So the patch should be something like, "optprobe_template_end:\n"); +NOKPROBE_SYMBOL(&optprobe_template_entry); +NOKPROBE_SYMBOL(&optprobe_template_val); +NOKPROBE_SYMBOL(&optprobe_template_call); +NOKPROBE_SYMBOL(&optprobe_template_end); + #define TMPL_MOVE_IDX \ ((long)&optprobe_template_val - (long)&optprobe_template_entry) > > v3.18.132: Failed to apply! Possible dependencies: > 0b24becc810d ("kasan: add kernel address sanitizer infrastructure") > 131484c8da97 ("x86/debug: Remove perpetually broken, unmaintainable dwarf annotations") > 24933b82c0d9 ("x86/asm/entry: Rename 'init_tss' to 'cpu_tss'") > 76f5df43cab5 ("x86/asm/entry/64: Always allocate a complete "struct pt_regs" on the kernel stack") > 8ef46a672a7d ("x86/asm/entry: Add this_cpu_sp0() to read sp0 for the current cpu") > 905a36a28518 ("x86/asm/entry: Move entry_64.S and entry_32.S to arch/x86/entry/") > 9d0c914c60f4 ("x86/asm/entry/64/compat: Change the 32-bit sysenter code to use sp0") > a232e3d558ee ("x86/asm/entry/32: Update "interrupt off" comments") > b87cf63e2a5f ("x86/asm/entry: Add comments about various syscall instructions") > c0dd671686b2 ("objtool: Mark non-standard object files and directories") > c207aee48037 ("objtool, x86: Add several functions and files to the objtool whitelist") > c63f06dd1579 ("kasan: move KASAN_SANITIZE in arch/x86/boot/Makefile") > ef7f0d6a6ca8 ("x86_64: add KASan support") > f876f440df39 ("crypto: sha256-mb - SHA256 multibuffer job manager and glue code") > > > How should we proceed with this patch? I'll send backport patches for those versions. Thank you, > > -- > Thanks, > Sasha -- Masami Hiramatsu <mhiramat@xxxxxxxxxx>