diff options
| author | Christophe Leroy <[email protected]> | 2022-12-02 08:31:42 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-12-02 10:59:57 +0000 |
| commit | b988e7797d09379057cf991ae082f9ad7a309a63 (patch) | |
| tree | ee80cecd3e52021109a0bed6f09b1a4fe200b926 /arch/powerpc/lib/code-patching.c | |
| parent | powerpc/feature-fixups: Refactor other fixups patching (diff) | |
| download | kernel-b988e7797d09379057cf991ae082f9ad7a309a63.tar.gz kernel-b988e7797d09379057cf991ae082f9ad7a309a63.zip | |
powerpc/feature-fixups: Do not patch init section after init
Once init section is freed, attempting to patch init code
ends up in the weed.
Commit 51c3c62b58b3 ("powerpc: Avoid code patching freed init sections")
protected patch_instruction() against that, but it is the responsibility
of the caller to ensure that the patched memory is valid.
In the same spirit as jump_label with its jump_label_can_update()
function, add is_fixup_addr_valid() function to skip patching on
freed init section.
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/8e9311fc1b057e4e6a2a3a0701ebcc74b787affe.1669969781.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
