[PATCH v2 3/4] ARC: implement syscall tracepoints

2022-04-14 Thread Sergey Matyukevich
From: Sergey Matyukevich Implement all the bits required to support HAVE_SYSCALL_TRACEPOINTS according to Documentation/trace/ftrace-design.rst. Signed-off-by: Sergey Matyukevich --- arch/arc/Kconfig | 1 + arch/arc/include/asm/syscall.h | 2 ++ arch/arc/include/asm/thr

[PATCH v2 4/4] ARC: disasm: handle ARCv2 case in kprobe get/set functions

2022-04-14 Thread Sergey Matyukevich
From: Sergey Matyukevich Current implementation of get_reg/set_reg implies ARCompact layout of pt_regs structure. Meanwhile pt_regs structure differs between ARCompact and ARCv2. Update those functions to handle ARCv2. Signed-off-by: Sergey Matyukevich --- arch/arc/kernel/disasm.c | 64 +++

[PATCH v2 2/4] ARC: entry: fix syscall_trace_exit argument

2022-04-14 Thread Sergey Matyukevich
From: Sergey Matyukevich Function syscall_trace_exit expects pointer to pt_regs. However r0 is also used to keep syscall return value. Restore pointer to pt_regs before calling syscall_trace_exit. Signed-off-by: Sergey Matyukevich --- arch/arc/kernel/entry.S | 1 + 1 file changed, 1 insertion(

[PATCH v2 1/4] ARC: enable HAVE_REGS_AND_STACK_ACCESS_API feature

2022-04-14 Thread Sergey Matyukevich
From: Sergey Matyukevich Enable HAVE_REGS_AND_STACK_ACCESS_API feature for ARC architecture, including ARCcompact and ARCv2 flavors. Add supporting functions and defines. Signed-off-by: Sergey Matyukevich --- arch/arc/Kconfig | 1 + arch/arc/include/asm/ptrace.h | 27

[PATCH v2 0/4] ARC: add missing bits for better BPF support

2022-04-14 Thread Sergey Matyukevich
Hi Vineet and all, Here is the second revision of the patch series implementing the following two features for ARC: - HAVE_REGS_AND_STACK_ACCESS_API - HAVE_SYSCALL_TRACEPOINTS Adding these features enables more BPF programs for ARC kernels, including KPROBE, TRACEPOINT, PERF_EVENT program types.