Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

asm-generic: introduce text-patching.h

Several architectures support text patching, but they name the header
files that declare patching functions differently.

Make all such headers consistently named text-patching.h and add an empty
header in asm-generic for architectures that do not support text patching.

Link: https://lkml.kernel.org/r/20241023162711.2579610-4-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Tested-by: kdevops <kdevops@lists.linux.dev>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Song Liu <song@kernel.org>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Mike Rapoport (Microsoft) and committed by
Andrew Morton
0c3beacf c82be0be

+110 -70
+1
arch/alpha/include/asm/Kbuild
··· 5 5 generic-y += asm-offsets.h 6 6 generic-y += kvm_para.h 7 7 generic-y += mcs_spinlock.h 8 + generic-y += text-patching.h
+1
arch/arc/include/asm/Kbuild
··· 6 6 generic-y += mcs_spinlock.h 7 7 generic-y += parport.h 8 8 generic-y += user.h 9 + generic-y += text-patching.h
arch/arm/include/asm/patch.h arch/arm/include/asm/text-patching.h
+1 -1
arch/arm/kernel/ftrace.c
··· 23 23 #include <asm/insn.h> 24 24 #include <asm/set_memory.h> 25 25 #include <asm/stacktrace.h> 26 - #include <asm/patch.h> 26 + #include <asm/text-patching.h> 27 27 28 28 /* 29 29 * The compiler emitted profiling hook consists of
+1 -1
arch/arm/kernel/jump_label.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/kernel.h> 3 3 #include <linux/jump_label.h> 4 - #include <asm/patch.h> 4 + #include <asm/text-patching.h> 5 5 #include <asm/insn.h> 6 6 7 7 static void __arch_jump_label_transform(struct jump_entry *entry,
+1 -1
arch/arm/kernel/kgdb.c
··· 15 15 #include <linux/kgdb.h> 16 16 #include <linux/uaccess.h> 17 17 18 - #include <asm/patch.h> 18 + #include <asm/text-patching.h> 19 19 #include <asm/traps.h> 20 20 21 21 struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] =
+1 -1
arch/arm/kernel/patch.c
··· 9 9 #include <asm/fixmap.h> 10 10 #include <asm/smp_plat.h> 11 11 #include <asm/opcodes.h> 12 - #include <asm/patch.h> 12 + #include <asm/text-patching.h> 13 13 14 14 struct patch { 15 15 void *addr;
+1 -1
arch/arm/probes/kprobes/core.c
··· 25 25 #include <asm/cacheflush.h> 26 26 #include <linux/percpu.h> 27 27 #include <linux/bug.h> 28 - #include <asm/patch.h> 28 + #include <asm/text-patching.h> 29 29 #include <asm/sections.h> 30 30 31 31 #include "../decode-arm.h"
+1 -1
arch/arm/probes/kprobes/opt-arm.c
··· 14 14 /* for arm_gen_branch */ 15 15 #include <asm/insn.h> 16 16 /* for patch_text */ 17 - #include <asm/patch.h> 17 + #include <asm/text-patching.h> 18 18 19 19 #include "core.h" 20 20
arch/arm64/include/asm/patching.h arch/arm64/include/asm/text-patching.h
+1 -1
arch/arm64/kernel/ftrace.c
··· 15 15 #include <asm/debug-monitors.h> 16 16 #include <asm/ftrace.h> 17 17 #include <asm/insn.h> 18 - #include <asm/patching.h> 18 + #include <asm/text-patching.h> 19 19 20 20 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_ARGS 21 21 struct fregs_offset {
+1 -1
arch/arm64/kernel/jump_label.c
··· 9 9 #include <linux/jump_label.h> 10 10 #include <linux/smp.h> 11 11 #include <asm/insn.h> 12 - #include <asm/patching.h> 12 + #include <asm/text-patching.h> 13 13 14 14 bool arch_jump_label_transform_queue(struct jump_entry *entry, 15 15 enum jump_label_type type)
+1 -1
arch/arm64/kernel/kgdb.c
··· 17 17 18 18 #include <asm/debug-monitors.h> 19 19 #include <asm/insn.h> 20 - #include <asm/patching.h> 20 + #include <asm/text-patching.h> 21 21 #include <asm/traps.h> 22 22 23 23 struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = {
+1 -1
arch/arm64/kernel/patching.c
··· 10 10 #include <asm/fixmap.h> 11 11 #include <asm/insn.h> 12 12 #include <asm/kprobes.h> 13 - #include <asm/patching.h> 13 + #include <asm/text-patching.h> 14 14 #include <asm/sections.h> 15 15 16 16 static DEFINE_RAW_SPINLOCK(patch_lock);
+1 -1
arch/arm64/kernel/probes/kprobes.c
··· 27 27 #include <asm/debug-monitors.h> 28 28 #include <asm/insn.h> 29 29 #include <asm/irq.h> 30 - #include <asm/patching.h> 30 + #include <asm/text-patching.h> 31 31 #include <asm/ptrace.h> 32 32 #include <asm/sections.h> 33 33 #include <asm/system_misc.h>
+1 -1
arch/arm64/kernel/traps.c
··· 41 41 #include <asm/extable.h> 42 42 #include <asm/insn.h> 43 43 #include <asm/kprobes.h> 44 - #include <asm/patching.h> 44 + #include <asm/text-patching.h> 45 45 #include <asm/traps.h> 46 46 #include <asm/smp.h> 47 47 #include <asm/stack_pointer.h>
+1 -1
arch/arm64/net/bpf_jit_comp.c
··· 19 19 #include <asm/cacheflush.h> 20 20 #include <asm/debug-monitors.h> 21 21 #include <asm/insn.h> 22 - #include <asm/patching.h> 22 + #include <asm/text-patching.h> 23 23 #include <asm/set_memory.h> 24 24 25 25 #include "bpf_jit.h"
+1
arch/csky/include/asm/Kbuild
··· 11 11 generic-y += parport.h 12 12 generic-y += user.h 13 13 generic-y += vmlinux.lds.h 14 + generic-y += text-patching.h
+1
arch/hexagon/include/asm/Kbuild
··· 5 5 generic-y += iomap.h 6 6 generic-y += kvm_para.h 7 7 generic-y += mcs_spinlock.h 8 + generic-y += text-patching.h
+1
arch/loongarch/include/asm/Kbuild
··· 11 11 generic-y += mmzone.h 12 12 generic-y += statfs.h 13 13 generic-y += param.h 14 + generic-y += text-patching.h
+1
arch/m68k/include/asm/Kbuild
··· 4 4 generic-y += kvm_para.h 5 5 generic-y += mcs_spinlock.h 6 6 generic-y += spinlock.h 7 + generic-y += text-patching.h
+1
arch/microblaze/include/asm/Kbuild
··· 8 8 generic-y += syscalls.h 9 9 generic-y += tlb.h 10 10 generic-y += user.h 11 + generic-y += text-patching.h
+1
arch/mips/include/asm/Kbuild
··· 13 13 generic-y += qrwlock.h 14 14 generic-y += qspinlock.h 15 15 generic-y += user.h 16 + generic-y += text-patching.h
+1
arch/nios2/include/asm/Kbuild
··· 7 7 generic-y += mcs_spinlock.h 8 8 generic-y += spinlock.h 9 9 generic-y += user.h 10 + generic-y += text-patching.h
+1
arch/openrisc/include/asm/Kbuild
··· 9 9 generic-y += qrwlock_types.h 10 10 generic-y += qrwlock.h 11 11 generic-y += user.h 12 + generic-y += text-patching.h
arch/parisc/include/asm/patch.h arch/parisc/include/asm/text-patching.h
+1 -1
arch/parisc/kernel/ftrace.c
··· 20 20 #include <asm/assembly.h> 21 21 #include <asm/sections.h> 22 22 #include <asm/ftrace.h> 23 - #include <asm/patch.h> 23 + #include <asm/text-patching.h> 24 24 25 25 #define __hot __section(".text.hot") 26 26
+1 -1
arch/parisc/kernel/jump_label.c
··· 8 8 #include <linux/jump_label.h> 9 9 #include <linux/bug.h> 10 10 #include <asm/alternative.h> 11 - #include <asm/patch.h> 11 + #include <asm/text-patching.h> 12 12 13 13 static inline int reassemble_17(int as17) 14 14 {
+1 -1
arch/parisc/kernel/kgdb.c
··· 16 16 #include <asm/ptrace.h> 17 17 #include <asm/traps.h> 18 18 #include <asm/processor.h> 19 - #include <asm/patch.h> 19 + #include <asm/text-patching.h> 20 20 #include <asm/cacheflush.h> 21 21 22 22 const struct kgdb_arch arch_kgdb_ops = {
+1 -1
arch/parisc/kernel/kprobes.c
··· 12 12 #include <linux/kprobes.h> 13 13 #include <linux/slab.h> 14 14 #include <asm/cacheflush.h> 15 - #include <asm/patch.h> 15 + #include <asm/text-patching.h> 16 16 17 17 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 18 18 DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
+1 -1
arch/parisc/kernel/patch.c
··· 13 13 14 14 #include <asm/cacheflush.h> 15 15 #include <asm/fixmap.h> 16 - #include <asm/patch.h> 16 + #include <asm/text-patching.h> 17 17 18 18 struct patch { 19 19 void *addr;
arch/powerpc/include/asm/code-patching.h arch/powerpc/include/asm/text-patching.h
+1 -1
arch/powerpc/include/asm/kprobes.h
··· 21 21 #include <linux/percpu.h> 22 22 #include <linux/module.h> 23 23 #include <asm/probes.h> 24 - #include <asm/code-patching.h> 24 + #include <asm/text-patching.h> 25 25 26 26 #ifdef CONFIG_KPROBES 27 27 #define __ARCH_WANT_KPROBES_INSN_SLOT
+1 -1
arch/powerpc/kernel/crash_dump.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/memblock.h> 15 15 #include <linux/of.h> 16 - #include <asm/code-patching.h> 16 + #include <asm/text-patching.h> 17 17 #include <asm/kdump.h> 18 18 #include <asm/firmware.h> 19 19 #include <linux/uio.h>
+1 -1
arch/powerpc/kernel/epapr_paravirt.c
··· 9 9 #include <linux/of_fdt.h> 10 10 #include <asm/epapr_hcalls.h> 11 11 #include <asm/cacheflush.h> 12 - #include <asm/code-patching.h> 12 + #include <asm/text-patching.h> 13 13 #include <asm/machdep.h> 14 14 #include <asm/inst.h> 15 15
+1 -1
arch/powerpc/kernel/jump_label.c
··· 5 5 6 6 #include <linux/kernel.h> 7 7 #include <linux/jump_label.h> 8 - #include <asm/code-patching.h> 8 + #include <asm/text-patching.h> 9 9 #include <asm/inst.h> 10 10 11 11 void arch_jump_label_transform(struct jump_entry *entry,
+1 -1
arch/powerpc/kernel/kgdb.c
··· 21 21 #include <asm/processor.h> 22 22 #include <asm/machdep.h> 23 23 #include <asm/debug.h> 24 - #include <asm/code-patching.h> 24 + #include <asm/text-patching.h> 25 25 #include <linux/slab.h> 26 26 #include <asm/inst.h> 27 27
+1 -1
arch/powerpc/kernel/kprobes.c
··· 21 21 #include <linux/slab.h> 22 22 #include <linux/set_memory.h> 23 23 #include <linux/execmem.h> 24 - #include <asm/code-patching.h> 24 + #include <asm/text-patching.h> 25 25 #include <asm/cacheflush.h> 26 26 #include <asm/sstep.h> 27 27 #include <asm/sections.h>
+1 -1
arch/powerpc/kernel/module_32.c
··· 18 18 #include <linux/bug.h> 19 19 #include <linux/sort.h> 20 20 #include <asm/setup.h> 21 - #include <asm/code-patching.h> 21 + #include <asm/text-patching.h> 22 22 23 23 /* Count how many different relocations (different symbol, different 24 24 addend) */
+1 -1
arch/powerpc/kernel/module_64.c
··· 17 17 #include <linux/kernel.h> 18 18 #include <asm/module.h> 19 19 #include <asm/firmware.h> 20 - #include <asm/code-patching.h> 20 + #include <asm/text-patching.h> 21 21 #include <linux/sort.h> 22 22 #include <asm/setup.h> 23 23 #include <asm/sections.h>
+1 -1
arch/powerpc/kernel/optprobes.c
··· 13 13 #include <asm/kprobes.h> 14 14 #include <asm/ptrace.h> 15 15 #include <asm/cacheflush.h> 16 - #include <asm/code-patching.h> 16 + #include <asm/text-patching.h> 17 17 #include <asm/sstep.h> 18 18 #include <asm/ppc-opcode.h> 19 19 #include <asm/inst.h>
+1 -1
arch/powerpc/kernel/process.c
··· 54 54 #include <asm/firmware.h> 55 55 #include <asm/hw_irq.h> 56 56 #endif 57 - #include <asm/code-patching.h> 57 + #include <asm/text-patching.h> 58 58 #include <asm/exec.h> 59 59 #include <asm/livepatch.h> 60 60 #include <asm/cpu_has_feature.h>
+1 -1
arch/powerpc/kernel/security.c
··· 14 14 #include <linux/debugfs.h> 15 15 16 16 #include <asm/asm-prototypes.h> 17 - #include <asm/code-patching.h> 17 + #include <asm/text-patching.h> 18 18 #include <asm/security_features.h> 19 19 #include <asm/sections.h> 20 20 #include <asm/setup.h>
+1 -1
arch/powerpc/kernel/setup_32.c
··· 40 40 #include <asm/time.h> 41 41 #include <asm/serial.h> 42 42 #include <asm/udbg.h> 43 - #include <asm/code-patching.h> 43 + #include <asm/text-patching.h> 44 44 #include <asm/cpu_has_feature.h> 45 45 #include <asm/asm-prototypes.h> 46 46 #include <asm/kdump.h>
+1 -1
arch/powerpc/kernel/setup_64.c
··· 60 60 #include <asm/xmon.h> 61 61 #include <asm/udbg.h> 62 62 #include <asm/kexec.h> 63 - #include <asm/code-patching.h> 63 + #include <asm/text-patching.h> 64 64 #include <asm/ftrace.h> 65 65 #include <asm/opal.h> 66 66 #include <asm/cputhreads.h>
+1 -1
arch/powerpc/kernel/static_call.c
··· 2 2 #include <linux/memory.h> 3 3 #include <linux/static_call.h> 4 4 5 - #include <asm/code-patching.h> 5 + #include <asm/text-patching.h> 6 6 7 7 void arch_static_call_transform(void *site, void *tramp, void *func, bool tail) 8 8 {
+1 -1
arch/powerpc/kernel/trace/ftrace.c
··· 23 23 #include <linux/list.h> 24 24 25 25 #include <asm/cacheflush.h> 26 - #include <asm/code-patching.h> 26 + #include <asm/text-patching.h> 27 27 #include <asm/ftrace.h> 28 28 #include <asm/syscall.h> 29 29 #include <asm/inst.h>
+1 -1
arch/powerpc/kernel/trace/ftrace_64_pg.c
··· 23 23 #include <linux/list.h> 24 24 25 25 #include <asm/cacheflush.h> 26 - #include <asm/code-patching.h> 26 + #include <asm/text-patching.h> 27 27 #include <asm/ftrace.h> 28 28 #include <asm/syscall.h> 29 29 #include <asm/inst.h>
+1 -1
arch/powerpc/lib/code-patching.c
··· 17 17 #include <asm/tlb.h> 18 18 #include <asm/tlbflush.h> 19 19 #include <asm/page.h> 20 - #include <asm/code-patching.h> 20 + #include <asm/text-patching.h> 21 21 #include <asm/inst.h> 22 22 23 23 static int __patch_mem(void *exec_addr, unsigned long val, void *patch_addr, bool is_dword)
+1 -1
arch/powerpc/lib/feature-fixups.c
··· 16 16 #include <linux/sched/mm.h> 17 17 #include <linux/stop_machine.h> 18 18 #include <asm/cputable.h> 19 - #include <asm/code-patching.h> 19 + #include <asm/text-patching.h> 20 20 #include <asm/interrupt.h> 21 21 #include <asm/page.h> 22 22 #include <asm/sections.h>
+1 -1
arch/powerpc/lib/test-code-patching.c
··· 6 6 #include <linux/vmalloc.h> 7 7 #include <linux/init.h> 8 8 9 - #include <asm/code-patching.h> 9 + #include <asm/text-patching.h> 10 10 11 11 static int __init instr_is_branch_to_addr(const u32 *instr, unsigned long addr) 12 12 {
+1 -1
arch/powerpc/lib/test_emulate_step.c
··· 11 11 #include <asm/cpu_has_feature.h> 12 12 #include <asm/sstep.h> 13 13 #include <asm/ppc-opcode.h> 14 - #include <asm/code-patching.h> 14 + #include <asm/text-patching.h> 15 15 #include <asm/inst.h> 16 16 17 17 #define MAX_SUBTESTS 16
+1 -1
arch/powerpc/mm/book3s32/mmu.c
··· 25 25 26 26 #include <asm/mmu.h> 27 27 #include <asm/machdep.h> 28 - #include <asm/code-patching.h> 28 + #include <asm/text-patching.h> 29 29 #include <asm/sections.h> 30 30 31 31 #include <mm/mmu_decl.h>
+1 -1
arch/powerpc/mm/book3s64/hash_utils.c
··· 57 57 #include <asm/sections.h> 58 58 #include <asm/copro.h> 59 59 #include <asm/udbg.h> 60 - #include <asm/code-patching.h> 60 + #include <asm/text-patching.h> 61 61 #include <asm/fadump.h> 62 62 #include <asm/firmware.h> 63 63 #include <asm/tm.h>
+1 -1
arch/powerpc/mm/book3s64/slb.c
··· 24 24 #include <linux/pgtable.h> 25 25 26 26 #include <asm/udbg.h> 27 - #include <asm/code-patching.h> 27 + #include <asm/text-patching.h> 28 28 29 29 #include "internal.h" 30 30
+1 -1
arch/powerpc/mm/kasan/init_32.c
··· 7 7 #include <linux/memblock.h> 8 8 #include <linux/sched/task.h> 9 9 #include <asm/pgalloc.h> 10 - #include <asm/code-patching.h> 10 + #include <asm/text-patching.h> 11 11 #include <mm/mmu_decl.h> 12 12 13 13 static pgprot_t __init kasan_prot_ro(void)
+1 -1
arch/powerpc/mm/mem.c
··· 26 26 #include <asm/svm.h> 27 27 #include <asm/mmzone.h> 28 28 #include <asm/ftrace.h> 29 - #include <asm/code-patching.h> 29 + #include <asm/text-patching.h> 30 30 #include <asm/setup.h> 31 31 #include <asm/fixmap.h> 32 32
+1 -1
arch/powerpc/mm/nohash/44x.c
··· 24 24 #include <asm/mmu.h> 25 25 #include <asm/page.h> 26 26 #include <asm/cacheflush.h> 27 - #include <asm/code-patching.h> 27 + #include <asm/text-patching.h> 28 28 #include <asm/smp.h> 29 29 30 30 #include <mm/mmu_decl.h>
+1 -1
arch/powerpc/mm/nohash/book3e_pgtable.c
··· 10 10 #include <asm/pgalloc.h> 11 11 #include <asm/tlb.h> 12 12 #include <asm/dma.h> 13 - #include <asm/code-patching.h> 13 + #include <asm/text-patching.h> 14 14 15 15 #include <mm/mmu_decl.h> 16 16
+1 -1
arch/powerpc/mm/nohash/tlb.c
··· 37 37 #include <asm/pgalloc.h> 38 38 #include <asm/tlbflush.h> 39 39 #include <asm/tlb.h> 40 - #include <asm/code-patching.h> 40 + #include <asm/text-patching.h> 41 41 #include <asm/cputhreads.h> 42 42 #include <asm/hugetlb.h> 43 43 #include <asm/paca.h>
+1 -1
arch/powerpc/mm/nohash/tlb_64e.c
··· 24 24 #include <asm/pgalloc.h> 25 25 #include <asm/tlbflush.h> 26 26 #include <asm/tlb.h> 27 - #include <asm/code-patching.h> 27 + #include <asm/text-patching.h> 28 28 #include <asm/cputhreads.h> 29 29 30 30 #include <mm/mmu_decl.h>
+1 -1
arch/powerpc/net/bpf_jit_comp.c
··· 18 18 #include <linux/bpf.h> 19 19 20 20 #include <asm/kprobes.h> 21 - #include <asm/code-patching.h> 21 + #include <asm/text-patching.h> 22 22 23 23 #include "bpf_jit.h" 24 24
+1 -1
arch/powerpc/perf/8xx-pmu.c
··· 14 14 #include <asm/machdep.h> 15 15 #include <asm/firmware.h> 16 16 #include <asm/ptrace.h> 17 - #include <asm/code-patching.h> 17 + #include <asm/text-patching.h> 18 18 #include <asm/inst.h> 19 19 20 20 #define PERF_8xx_ID_CPU_CYCLES 1
+1 -1
arch/powerpc/perf/core-book3s.c
··· 16 16 #include <asm/machdep.h> 17 17 #include <asm/firmware.h> 18 18 #include <asm/ptrace.h> 19 - #include <asm/code-patching.h> 19 + #include <asm/text-patching.h> 20 20 #include <asm/hw_irq.h> 21 21 #include <asm/interrupt.h> 22 22
+1 -1
arch/powerpc/platforms/85xx/smp.c
··· 23 23 #include <asm/mpic.h> 24 24 #include <asm/cacheflush.h> 25 25 #include <asm/dbell.h> 26 - #include <asm/code-patching.h> 26 + #include <asm/text-patching.h> 27 27 #include <asm/cputhreads.h> 28 28 #include <asm/fsl_pm.h> 29 29
+1 -1
arch/powerpc/platforms/86xx/mpc86xx_smp.c
··· 12 12 #include <linux/delay.h> 13 13 #include <linux/pgtable.h> 14 14 15 - #include <asm/code-patching.h> 15 + #include <asm/text-patching.h> 16 16 #include <asm/page.h> 17 17 #include <asm/pci-bridge.h> 18 18 #include <asm/mpic.h>
+1 -1
arch/powerpc/platforms/cell/smp.c
··· 35 35 #include <asm/firmware.h> 36 36 #include <asm/rtas.h> 37 37 #include <asm/cputhreads.h> 38 - #include <asm/code-patching.h> 38 + #include <asm/text-patching.h> 39 39 40 40 #include "interrupt.h" 41 41 #include <asm/udbg.h>
+1 -1
arch/powerpc/platforms/powermac/smp.c
··· 35 35 36 36 #include <asm/ptrace.h> 37 37 #include <linux/atomic.h> 38 - #include <asm/code-patching.h> 38 + #include <asm/text-patching.h> 39 39 #include <asm/irq.h> 40 40 #include <asm/page.h> 41 41 #include <asm/sections.h>
+1 -1
arch/powerpc/platforms/powernv/idle.c
··· 18 18 #include <asm/opal.h> 19 19 #include <asm/cputhreads.h> 20 20 #include <asm/cpuidle.h> 21 - #include <asm/code-patching.h> 21 + #include <asm/text-patching.h> 22 22 #include <asm/smp.h> 23 23 #include <asm/runlatch.h> 24 24 #include <asm/dbell.h>
+1 -1
arch/powerpc/platforms/powernv/smp.c
··· 28 28 #include <asm/xive.h> 29 29 #include <asm/opal.h> 30 30 #include <asm/runlatch.h> 31 - #include <asm/code-patching.h> 31 + #include <asm/text-patching.h> 32 32 #include <asm/dbell.h> 33 33 #include <asm/kvm_ppc.h> 34 34 #include <asm/ppc-opcode.h>
+1 -1
arch/powerpc/platforms/pseries/smp.c
··· 39 39 #include <asm/xive.h> 40 40 #include <asm/dbell.h> 41 41 #include <asm/plpar_wrappers.h> 42 - #include <asm/code-patching.h> 42 + #include <asm/text-patching.h> 43 43 #include <asm/svm.h> 44 44 #include <asm/kvm_guest.h> 45 45
+1 -1
arch/powerpc/xmon/xmon.c
··· 50 50 #include <asm/xive.h> 51 51 #include <asm/opal.h> 52 52 #include <asm/firmware.h> 53 - #include <asm/code-patching.h> 53 + #include <asm/text-patching.h> 54 54 #include <asm/sections.h> 55 55 #include <asm/inst.h> 56 56 #include <asm/interrupt.h>
+1 -1
arch/riscv/errata/andes/errata.c
··· 13 13 #include <asm/alternative.h> 14 14 #include <asm/cacheflush.h> 15 15 #include <asm/errata_list.h> 16 - #include <asm/patch.h> 16 + #include <asm/text-patching.h> 17 17 #include <asm/processor.h> 18 18 #include <asm/sbi.h> 19 19 #include <asm/vendorid_list.h>
+1 -1
arch/riscv/errata/sifive/errata.c
··· 8 8 #include <linux/module.h> 9 9 #include <linux/string.h> 10 10 #include <linux/bug.h> 11 - #include <asm/patch.h> 11 + #include <asm/text-patching.h> 12 12 #include <asm/alternative.h> 13 13 #include <asm/vendorid_list.h> 14 14 #include <asm/errata_list.h>
+1 -1
arch/riscv/errata/thead/errata.c
··· 16 16 #include <asm/errata_list.h> 17 17 #include <asm/hwprobe.h> 18 18 #include <asm/io.h> 19 - #include <asm/patch.h> 19 + #include <asm/text-patching.h> 20 20 #include <asm/vendorid_list.h> 21 21 #include <asm/vendor_extensions.h> 22 22
arch/riscv/include/asm/patch.h arch/riscv/include/asm/text-patching.h
+1 -1
arch/riscv/include/asm/uprobes.h
··· 4 4 #define _ASM_RISCV_UPROBES_H 5 5 6 6 #include <asm/probes.h> 7 - #include <asm/patch.h> 7 + #include <asm/text-patching.h> 8 8 #include <asm/bug.h> 9 9 10 10 #define MAX_UINSN_BYTES 8
+1 -1
arch/riscv/kernel/alternative.c
··· 18 18 #include <asm/sbi.h> 19 19 #include <asm/csr.h> 20 20 #include <asm/insn.h> 21 - #include <asm/patch.h> 21 + #include <asm/text-patching.h> 22 22 23 23 struct cpu_manufacturer_info_t { 24 24 unsigned long vendor_id;
+2 -1
arch/riscv/kernel/cpufeature.c
··· 20 20 #include <asm/cacheflush.h> 21 21 #include <asm/cpufeature.h> 22 22 #include <asm/hwcap.h> 23 - #include <asm/patch.h> 23 + #include <asm/text-patching.h> 24 + #include <asm/hwprobe.h> 24 25 #include <asm/processor.h> 25 26 #include <asm/sbi.h> 26 27 #include <asm/vector.h>
+1 -1
arch/riscv/kernel/ftrace.c
··· 10 10 #include <linux/memory.h> 11 11 #include <linux/stop_machine.h> 12 12 #include <asm/cacheflush.h> 13 - #include <asm/patch.h> 13 + #include <asm/text-patching.h> 14 14 15 15 #ifdef CONFIG_DYNAMIC_FTRACE 16 16 void ftrace_arch_code_modify_prepare(void) __acquires(&text_mutex)
+1 -1
arch/riscv/kernel/jump_label.c
··· 10 10 #include <linux/mutex.h> 11 11 #include <asm/bug.h> 12 12 #include <asm/cacheflush.h> 13 - #include <asm/patch.h> 13 + #include <asm/text-patching.h> 14 14 15 15 #define RISCV_INSN_NOP 0x00000013U 16 16 #define RISCV_INSN_JAL 0x0000006fU
+1 -1
arch/riscv/kernel/patch.c
··· 13 13 #include <asm/cacheflush.h> 14 14 #include <asm/fixmap.h> 15 15 #include <asm/ftrace.h> 16 - #include <asm/patch.h> 16 + #include <asm/text-patching.h> 17 17 #include <asm/sections.h> 18 18 19 19 struct patch_insn {
+1 -1
arch/riscv/kernel/probes/kprobes.c
··· 12 12 #include <asm/sections.h> 13 13 #include <asm/cacheflush.h> 14 14 #include <asm/bug.h> 15 - #include <asm/patch.h> 15 + #include <asm/text-patching.h> 16 16 17 17 #include "decode-insn.h" 18 18
+1 -1
arch/riscv/net/bpf_jit_comp64.c
··· 10 10 #include <linux/filter.h> 11 11 #include <linux/memory.h> 12 12 #include <linux/stop_machine.h> 13 - #include <asm/patch.h> 13 + #include <asm/text-patching.h> 14 14 #include <asm/cfi.h> 15 15 #include <asm/percpu.h> 16 16 #include "bpf_jit.h"
+1 -1
arch/riscv/net/bpf_jit_core.c
··· 9 9 #include <linux/bpf.h> 10 10 #include <linux/filter.h> 11 11 #include <linux/memory.h> 12 - #include <asm/patch.h> 12 + #include <asm/text-patching.h> 13 13 #include <asm/cfi.h> 14 14 #include "bpf_jit.h" 15 15
+1
arch/sh/include/asm/Kbuild
··· 3 3 generic-y += kvm_para.h 4 4 generic-y += mcs_spinlock.h 5 5 generic-y += parport.h 6 + generic-y += text-patching.h
+1
arch/sparc/include/asm/Kbuild
··· 4 4 generic-y += agp.h 5 5 generic-y += kvm_para.h 6 6 generic-y += mcs_spinlock.h 7 + generic-y += text-patching.h
+5
arch/um/kernel/um_arch.c
··· 468 468 return memcpy(addr, opcode, len); 469 469 } 470 470 471 + void *text_poke_copy(void *addr, const void *opcode, size_t len) 472 + { 473 + return text_poke(addr, opcode, len); 474 + } 475 + 471 476 void text_poke_sync(void) 472 477 { 473 478 }
+1
arch/x86/include/asm/text-patching.h
··· 35 35 extern void text_poke_sync(void); 36 36 extern void *text_poke_kgdb(void *addr, const void *opcode, size_t len); 37 37 extern void *text_poke_copy(void *addr, const void *opcode, size_t len); 38 + #define text_poke_copy text_poke_copy 38 39 extern void *text_poke_copy_locked(void *addr, const void *opcode, size_t len, bool core_ok); 39 40 extern void *text_poke_set(void *addr, int c, size_t len); 40 41 extern int poke_int3_handler(struct pt_regs *regs);
+1
arch/xtensa/include/asm/Kbuild
··· 8 8 generic-y += qrwlock.h 9 9 generic-y += qspinlock.h 10 10 generic-y += user.h 11 + generic-y += text-patching.h
+5
include/asm-generic/text-patching.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_GENERIC_TEXT_PATCHING_H 3 + #define _ASM_GENERIC_TEXT_PATCHING_H 4 + 5 + #endif /* _ASM_GENERIC_TEXT_PATCHING_H */
+15
include/linux/text-patching.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _LINUX_TEXT_PATCHING_H 3 + #define _LINUX_TEXT_PATCHING_H 4 + 5 + #include <asm/text-patching.h> 6 + 7 + #ifndef text_poke_copy 8 + static inline void *text_poke_copy(void *dst, const void *src, size_t len) 9 + { 10 + return memcpy(dst, src, len); 11 + } 12 + #define text_poke_copy text_poke_copy 13 + #endif 14 + 15 + #endif /* _LINUX_TEXT_PATCHING_H */