parisc: add parisc code patching
Instead of re-mapping the whole kernel text with RWX rights add a patch_text() which can be used to replace instructions in the kernel .text section. Based on the ARM implementation. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:

committed by
Helge Deller

parent
ccfbc68d41
commit
620a53d522
11
arch/parisc/include/asm/patch.h
Normal file
11
arch/parisc/include/asm/patch.h
Normal file
@@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _PARISC_KERNEL_PATCH_H
|
||||
#define _PARISC_KERNEL_PATCH_H
|
||||
|
||||
/* stop machine and patch kernel text */
|
||||
void patch_text(void *addr, unsigned int insn);
|
||||
|
||||
/* patch kernel text with machine already stopped (e.g. in kgdb) */
|
||||
void __patch_text(void *addr, unsigned int insn);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user