[PATCH 4/4] ARC: implement syscall tracepoints

2022-04-08 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 2/4] ARC: enable HAVE_REGS_AND_STACK_ACCESS_API feature

2022-04-08 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 0/4] ARC: add missing bits for better BPF support

2022-04-08 Thread Sergey Matyukevich
Hi Vineet and all, This patch set implements 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. Regards, Sergey Sergey Matyukevic

[PATCH 1/4] ARC: bpf: define uapi for BPF_PROG_TYPE_PERF_EVENT program type

2022-04-08 Thread Sergey Matyukevich
From: Sergey Matyukevich Define appropriate uapi for the BPF_PROG_TYPE_PERF_EVENT program type by exporting the user_regs_struct structure instead of the pt_regs structure that is in-kernel only. Signed-off-by: Sergey Matyukevich --- arch/arc/include/asm/perf_event.h | 4 arch/ar

[PATCH 3/4] ARC: entry: fix syscall_trace_exit argument

2022-04-08 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(