# Re: \[PATCH v19 13/19\] fprobe: Add fprobe\_header encoding feature

- From: Heiko Carstens \<hca@linux.ibm.com\>
- Date: 2024-11-10 17:17:14 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/11/2819799
- Thread: https://ratatoskr.run/linux-trace-kernel/2024/11/2819758/t.md

```text
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
```
