On Wed, 05 Feb 2025 00:18:21 +0100, Anthony Iliopoulos wrote: > 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: > > [...]
Applied to powerpc/fixes. [1/1] powerpc64/ftrace: fix module loading without patchable function entries https://git.kernel.org/powerpc/c/534f5a8ba27863141e29766467a3e1f61bcb47ac Thanks