Re: [PATCH v19 13/19] fprobe: Add fprobe_header encoding feature

Heiko Carstens
2024-11-10T17:17:14Z

On Mon, Nov 11, 2024 at 12:51:25AM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Fprobe store its data structure address and size on the fgraph return stack
> by __fprobe_header. But most 64bit architecture can combine those to
> one unsigned long value because 4 MSB in the kernel address are the same.
> With this encoding, fprobe can consume less space on ret_stack.
>
> This introduces asm/fprobe.h to define arch dependent encode/decode
> macros. Note that since fprobe depends on CONFIG_HAVE_FUNCTION_GRAPH_FREGS,
> currently only arm64, loongarch, riscv, s390 and x86 are supported.
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> arch/arm64/include/asm/Kbuild | 1 +
> arch/loongarch/include/asm/fprobe.h | 12 +++++++++
> arch/riscv/include/asm/Kbuild | 1 +
> arch/s390/include/asm/fprobe.h | 10 ++++++++

Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390