diff options
author | Joe Lawrence <joe.lawrence@redhat.com> | 2025-09-12 10:27:40 -0400 |
---|---|---|
committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2025-09-15 16:40:52 +0530 |
commit | b137312fbf2dd1edc39acf7e8e6e8ac0a6ad72c0 (patch) | |
tree | 0a5bffc5ea46c74be7bfd5a1f99866430f88fd27 /scripts/generate_rust_analyzer.py | |
parent | f6b4df37ebfeb47e50e27780500d2d06b4d211bd (diff) |
powerpc64/modules: replace stub allocation sentinel with an explicit counter
The logic for allocating ppc64_stub_entry trampolines in the .stubs
section relies on an inline sentinel, where a NULL .funcdata member
indicates an available slot.
While preceding commits fixed the initialization bugs that led to ftrace
stub corruption, the sentinel-based approach remains fragile: it depends
on an implicit convention between subsystems modifying different
struct types in the same memory area.
Replace the sentinel with an explicit counter, module->arch.num_stubs.
Instead of iterating through memory to find a NULL marker, the module
loader uses this counter as the boundary for the next free slot.
This simplifies the allocation code, hardens it against future changes
to stub structures, and removes the need for an extra relocation slot
previously reserved to terminate the sentinel search.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Naveen N Rao (AMD) <naveen@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250912142740.3581368-4-joe.lawrence@redhat.com
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions