Commit Graph

5 Commits

Author SHA1 Message Date
Vincent Li
6aaec8d485 xdp-tools: Add xdp-ddos XDP main program
add xdp_ddos XDP main program with bpf tail
call table and user space xdp-ddos program
to load and insert protocol DDoS program like
TCP or UDP or ICMP into bpf tail call table.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-01 13:38:09 -07:00
Vincent Li
0f9937c78f xdp-tools: Add XDP synproxy tailcall program
LoongArch does not support bpf trampoline, so
use tail call to call XDP synproxy program

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-03-25 19:41:42 -07:00
Vincent Li
43dd019fb3 xdp-tools: fix XDP dns log stack smashing error
commit f938e63dc6b2cd8a271bb4aa58d8371f4a9fa94c
Author: Vincent Li <vincent.mc.li@gmail.com>
Date:   Sat Jan 11 10:55:23 2025 -0800

    xdp-dns: fix XDP dns log stack smashing error

    gdb --args xdp_dns_log /sys/fs/bpf/xdp-tailcall/dns_ringbuf

    result in backtrace:

    (gdb) bt
     0x00007ffff7d5fa80 in ?? () from /lib64/libc.so.6
     0x00007ffff7d0be1c in raise () from /lib64/libc.so.6
     0x00007ffff7cf49fc in abort () from /lib64/libc.so.6
     0x00007ffff7d50ff0 in ?? () from /lib64/libc.so.6
     0x00007ffff7de32d4 in __fortify_fail () from /lib64/libc.so.6
     0x00007ffff7de42b0 in __stack_chk_fail () from /lib64/libc.so.6
     0x000000012000f248 in handle_event ()
     0x00007ffff7eca0fc in ?? () from /usr/lib64/libbpf.so.1
     0x00007ffff7eca8c8 in ring_buffer.poll () from /usr/lib64/libbpf.so.1
     0x000000012000372c in main ()

    Paste the gdb backtrace in ChatGPT and ChatGPT suggested the fix

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-11 11:06:15 -08:00
Vincent Li
dec6a99c77 xdp-tools: add xdp-tailcall
Loongarch64 does not support bpf trampoline
and freplace, so we can't use libxdp to attach
multiple XDP program to same network interface.

Loongarch64 supports bpf tail call, so we can still
use xdp-loader to load XDP program, and use bpf tail
call to call each XDP program. now we can tail call
DNS and TLS SNI XDP program on green0 interface

change user space program to take bpf map path as
command line argument so X86 and Loongarch64 can share
same user space program

https://github.com/vincentmli/xdp-tools

commit d18f8a7b48094c861a8ee0d5c0d52e93a01edca4
Author: Vincent Li <vincent.mc.li@gmail.com>
Date:   Tue Jan 7 22:14:40 2025 -0800

    xdp-tools: add bpf map path as cmd line argument

    add XDP DNS and TLS SNI user space program command
    line argument for bpf map so X86 and Loongarch can
    share the same XDP user space program

commit 5d713b40dd2d0ce399f618179a2add6c07882e2a
Author: Vincent Li <vincent.mc.li@gmail.com>
Date:   Mon Jan 6 21:09:25 2025 -0800

    xdp-tailcall: add DNS XDP program

    add DNS XDP program as tail called program

commit ad2a4e600140f8bf7a577470566efcdf11f6e214
Author: Vincent Li <vincent.mc.li@gmail.com>
Date:   Mon Jan 6 20:36:43 2025 -0800

    xdp-tailcall: add XDP tailcall

    Loongarch64 does not support bpf trampoline and
    freplace, so use tail call to call XDP program.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-07 15:41:25 -08:00
Vincent Li
cfefb2a884 xdp-tools: add xdp-tools
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-22 11:28:31 -08:00