arm64: patching: implement text_poke API
authorPuranjay Mohan <puranjay12@gmail.com>
Wed, 28 Feb 2024 14:18:23 +0000 (14:18 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 28 Feb 2024 21:44:47 +0000 (13:44 -0800)
commit451c3cab9a65e656c3b3d106831fc02d56b8c34a
treec2b00ae685ab7a3fcb487d18ca6e8219a99f92cf
parente59997d9052599feb17419289f2a57ed300e1dfa
arm64: patching: implement text_poke API

The text_poke API is used to implement functions like memcpy() and
memset() for instruction memory (RO+X). The implementation is similar to
the x86 version.

This will be used by the BPF JIT to write and modify BPF programs. There
could be more users of this in the future.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20240228141824.119877-2-puranjay12@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/arm64/include/asm/patching.h
arch/arm64/kernel/patching.c