[PATCH] powerpc64/ftrace: fix module loading without patchable function entries

Madhavan Srinivasan maddy at linux.ibm.com
Mon Apr 21 19:41:05 AEST 2025


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


More information about the Linuxppc-dev mailing list