linux-yocto/arch/powerpc/kernel
Anthony Iliopoulos 534f5a8ba2 powerpc64/ftrace: fix module loading without patchable function entries
get_stubs_size assumes that there must always be at least one patchable
function entry, which is not always the case (modules that export data
but no code), otherwise it returns -ENOEXEC and thus the section header
sh_size is set to that value. During module_memory_alloc() the size is
passed to execmem_alloc() after being page-aligned and thus set to zero
which will cause it to fail the allocation (and thus module loading) as
__vmalloc_node_range() checks for zero-sized allocs and returns null:

[  115.466896] module_64: cast_common: doesn't contain __patchable_function_entries.
[  115.469189] ------------[ cut here ]------------
[  115.469496] WARNING: CPU: 0 PID: 274 at mm/vmalloc.c:3778 __vmalloc_node_range_noprof+0x8b4/0x8f0
...
[  115.478574] ---[ end trace 0000000000000000 ]---
[  115.479545] execmem: unable to allocate memory

Fix this by removing the check completely, since it is anyway not
helpful to propagate this as an error upwards.

Fixes: eec37961a5 ("powerpc64/ftrace: Move ftrace sequence out of line")
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Acked-by: Naveen N Rao (AMD) <naveen@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250204231821.39140-1-ailiop@suse.com
2025-04-15 11:40:54 +05:30
..
ptrace seccomp: remove the 'sd' argument from __secure_computing() 2025-02-10 09:26:22 -08:00
syscalls fs: add open_tree_attr() 2025-02-12 12:12:28 +01:00
trace powerpc/ftrace: Use RCU in all users of __module_text_address(). 2025-03-10 11:54:45 +01:00
vdso powerpc/vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
.gitignore
85xx_entry_mapping.S
align.c
asm-offsets.c powerpc/vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
audit_32.h
audit.c
btext.c powerpc: Use shared font data 2023-10-01 23:09:02 +11:00
cacheinfo.c powerpc: Constify struct kobj_type 2024-09-05 22:25:36 +10:00
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX 2024-05-08 00:25:00 +10:00
cpu_setup_44x.S
cpu_setup_e500.S
cpu_setup_pa6t.S
cpu_setup_power.c
cpu_setup_ppc970.S
cpu_specs_8xx.h
cpu_specs_44x.h
cpu_specs_47x.h
cpu_specs_85xx.h
cpu_specs_book3s_32.h
cpu_specs_book3s_64.h powerpc: Add Power11 architected and raw mode 2024-02-21 23:11:00 +11:00
cpu_specs_e500mc.h powerpc/cputable: Add missing PPC_FEATURE_BOOKE on PPC64 Book-E 2024-02-14 14:24:06 +11:00
cpu_specs.h powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
cputable.c powerpc: Make cpu_spec __ro_after_init 2023-11-27 22:01:14 +11:00
crash_dump.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
dawr.c
dbell.c
dexcr.c powerpc/dexcr: Add DEXCR prctl interface 2024-05-06 22:04:31 +10:00
dma-iommu.c powerpc: Remove some Cell leftovers 2025-02-26 21:15:07 +05:30
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
early_32.c
eeh_cache.c
eeh_driver.c powerpc/eeh: Permanently disable the removed device 2024-04-29 23:51:15 +10:00
eeh_event.c
eeh_pe.c powerpc/eeh: avoid possible crash when edev->pdev changes 2024-06-23 11:54:27 +10:00
eeh_sysfs.c
eeh.c powerpc/pseries/eeh: move pseries_eeh_err_inject() outside CONFIG_DEBUG_FS block 2024-09-20 19:06:25 +10:00
entry_32.S powerpc: Replace CONFIG_4xx with CONFIG_44x 2024-06-28 22:28:48 +10:00
epapr_hcalls.S powerpc/4xx: Remove CONFIG_BOOKE_OR_40x 2024-06-28 22:28:48 +10:00
epapr_paravirt.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
exceptions-64e.S powerpc/64e: drop unused TLB miss handlers 2024-07-12 15:52:15 -07:00
exceptions-64s.S powerpc/cell: Remove support for IBM Cell Blades 2025-02-26 21:15:07 +05:30
fadump.c powerpc updates for 6.15 2025-03-27 19:39:08 -07:00
firmware.c powerpc: Export kvm_guest static key, for bcachefs six locks 2024-01-01 11:47:38 -05:00
fpu.S powerpc: Don't clobber f0/vs0 during fp|altivec register save 2023-11-28 23:04:43 +11:00
head_8xx.S powerpc/8xx: Fix kernel DTLB miss on dcbz 2024-10-11 15:53:06 +11:00
head_32.h powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
head_44x.S powerpc/44x: Introduce _PAGE_READ and remove _PAGE_USER 2023-10-19 17:12:46 +11:00
head_64.S powerpc/64s: Fix unnecessary copy to 0 when kernel is booted at address 0 2024-06-23 11:54:13 +10:00
head_85xx.S powerpc/e500: use contiguous PMD instead of hugepd 2024-07-12 15:52:18 -07:00
head_book3s_32.S powerpc/603: Inconditionally use task PGDIR in DTLB misses 2024-08-30 21:29:55 +10:00
head_booke.h powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
hw_breakpoint_constraints.c
hw_breakpoint.c
idle_6xx.S
idle_64e.S
idle_85xx.S
idle_book3s.S
idle.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
ima_arch.c
interrupt_64.S powerpc/64: Set task pt_regs->link to the LR value on scv entry 2024-02-05 22:43:19 +11:00
interrupt.c powerpc: Add preempt lazy support 2024-12-19 14:21:08 +05:30
io.c powerpc/io: Use standard barrier macros in io.c 2025-02-26 21:15:09 +05:30
iomap.c
iommu.c powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW 2025-01-11 10:39:10 +05:30
irq_64.c work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
irq.c powerpc/irq: use seq_put_decimal_ull_width() for decimal values 2024-11-10 22:33:52 +11:00
isa-bridge.c mm: Introduce vmap_page_range() to map pages in PCI address space 2024-03-11 16:58:10 +01:00
jump_label.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
kdebugfs.c
kgdb.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
kprobes-ftrace.c kprobe/ftrace: bail out if ftrace was killed 2024-05-16 07:23:30 +09:00
kprobes.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
kvm_emul.S
kvm.c
l2cr_6xx.S
legacy_serial.c
Makefile powerpc/io: Remove PPC_IO_WORKAROUNDS 2025-02-26 21:15:08 +05:30
mce_power.c
mce.c
misc_32.S powerpc/32: Replace mulhdu() by mul_u64_u64_shr() 2024-12-10 08:15:30 +05:30
misc_64.S powerpc/64: Remove maple platform 2024-10-29 23:01:52 +11:00
misc.S
module_32.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
module_64.c powerpc64/ftrace: fix module loading without patchable function entries 2025-04-15 11:40:54 +05:30
module.c powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
msi.c
note.S
nvram_64.c printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
optprobes_head.S
optprobes.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
paca.c docs: move powerpc under arch 2023-10-10 13:35:55 -06:00
pci_32.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
pci_64.c
pci_dn.c
pci_of_scan.c
pci-common.c arch: Rename fbdev header and source files 2024-05-03 17:07:50 +02:00
pci-hotplug.c powerpc/pci: Hotplug driver bridge support 2024-07-04 23:10:40 +10:00
pmc.c
ppc_save_regs.S
proc_powerpc.c powerpc: Split systemcfg struct definitions out from vdso 2024-11-02 12:37:36 +01:00
process.c powerpc/64: Use get_user() in start_thread() 2024-12-18 13:41:57 +05:30
prom_entry_64.S
prom_init_check.sh
prom_init.c powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7 2025-03-07 19:08:38 +05:30
prom_parse.c
prom.c powerpc/crash: use generic crashkernel reservation 2025-03-16 22:30:48 -07:00
reloc_32.S
reloc_64.S
rethook.c powerpc: Replace kretprobe code with rethook on powerpc 2024-09-05 22:25:36 +10:00
rtas_entry.S
rtas_flash.c powerpc: add missing MODULE_DESCRIPTION() macros 2024-07-04 22:39:20 +10:00
rtas_pci.c powerpc/rtas_pci: rename and properly expose config access APIs 2023-11-28 21:49:45 +11:00
rtas-proc.c powerpc/rtas: Fix ppc_rtas_rmo_buf_show() kernel-doc 2023-11-07 13:13:45 +11:00
rtas-rtc.c
rtas.c powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
rtasd.c
secure_boot.c powerpc: Use str_enabled_disabled() helper function 2024-11-05 20:48:20 +11:00
security.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
secvar-ops.c
secvar-sysfs.c powerpc/secvar: Constify 'struct bin_attribute' 2025-02-21 09:20:32 +01:00
setup_32.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
setup_64.c powerpc/io: Remove PPC_INDIRECT_MMIO 2025-02-26 21:15:08 +05:30
setup-common.c arch, mm: set max_mapnr when allocating memory map for FLATMEM 2025-03-17 22:06:52 -07:00
setup.h powerpc/4xx: Remove CONFIG_BOOKE_OR_40x 2024-06-28 22:28:48 +10:00
signal_32.c
signal_64.c
signal.c
signal.h
smp-tbsync.c
smp.c powerpc: Split systemcfg struct definitions out from vdso 2024-11-02 12:37:36 +01:00
stacktrace.c powerpc: Replace kretprobe code with rethook on powerpc 2024-09-05 22:25:36 +10:00
static_call.c powerpc/static_call: Implement inline static calls 2025-02-26 21:09:43 +05:30
suspend.c
switch.S powerpc: Fix 'intra_function_call not a direct call' warning 2025-03-10 10:00:17 +05:30
swsusp_32.S
swsusp_64.c powerpc/suspend: Add prototype for do_after_copyback() 2023-11-30 13:15:49 +11:00
swsusp_85xx.S
swsusp_asm64.S
swsusp.c
sys_ppc32.c
syscall.c treewide: context_tracking: Rename CONTEXT_* into CT_STATE_* 2024-07-29 07:33:10 +05:30
syscalls.c
sysfs.c powerpc/machdep: Drop include of dma-mapping.h 2024-10-29 23:01:05 +11:00
systbl.c
tau_6xx.c
time.c powerpc updates for 6.15 2025-03-27 19:39:08 -07:00
tm.S
traps.c powerpc: Rely on generic printing of preemption model 2025-03-17 11:23:39 +01:00
ucall.S
udbg_16550.c powerpc/64: Remove maple platform 2024-10-29 23:01:52 +11:00
udbg.c powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
uprobes.c
vdso.c powerpc/vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
vdso32_wrapper.S powerpc/vdso: Mark the vDSO code read-only after init 2024-12-18 13:46:38 +05:30
vdso64_wrapper.S powerpc/vdso: Mark the vDSO code read-only after init 2024-12-18 13:46:38 +05:30
vecemu.c
vector.S powerpc: Don't clobber f0/vs0 during fp|altivec register save 2023-11-28 23:04:43 +11:00
vmlinux.lds.S powerpc/vmlinux: Remove etext, edata and end 2025-02-24 12:26:21 +05:30
watchdog.c powerpc/watchdog: Switch to use hrtimer_setup() 2025-02-18 10:32:31 +01:00