From ca73d13b12f749953dd4ff8d2fae8b894b7fe520 Mon Sep 17 00:00:00 2001 From: Luis Gerhorst <privat@luisgerhorst.de> Date: Fri, 26 Feb 2021 17:42:36 +0100 Subject: [PATCH] bpftask: syscall_wrapper: TODOs --- arch/x86/include/asm/syscall_wrapper.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index 45ce398afe9fd..3d4fde311f916 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h @@ -228,6 +228,10 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); #define BPF_TASK_SYS(x, name, ...) BPF_TASK_SYS_##x(name) +/* TODO: cast args to avoid warnings when passing argX to __do_sys(...) + * + * TODO: Instead of passing the array size we could pass one more arg directly + * if we define a special bpf type (long array of length 1 / 2). */ #define BPF_TASK_SYS_1(name) \ BPF_CALL_5(bpf_task_sys##name, u64, arg1, u64, arg2, u64, arg3, u64 *, arg_tail, u64, size) \ { \ @@ -268,7 +272,6 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); return __do_sys##name(arg1, arg2, arg3, arg_tail[0], arg_tail[1], arg_tail[2]); \ } -/* TODO: declare args in prototype */ #define __SYSCALL_DEFINEx(x, name, ...) \ static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ -- GitLab