Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ebpf randomize udp streams #17

Conversation

alltilla
Copy link

No description provided.

bazsi and others added 12 commits March 15, 2023 09:48
This hook can be used by plugins to potentially change socket related
settings once syslog-ng has finished by its own.

This makes it possible to attach EBPF programs, change socket options, etc.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Building the eBPF module is not for the fainthearted, but we need some
testing, so enable it in the devshell build, even if it is disabled
everywhere else.  This ensures that at least we are in a compilable state.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
@alltilla
Copy link
Author

My libbpf autodetection enabled the build in our CI automatically, and it seems like it fails because of some minor things:

[ 57%] Building C object modules/ebpf/CMakeFiles/ebpf.dir/random.skel.c.o
[ 57%] Building C object modules/getent/CMakeFiles/tfgetent.dir/tfgetent.c.o
/__w/syslog-ng/syslog-ng/build/modules/ebpf/random.skel.c:91:1: error: unused function 'random_kern__open_and_load' [-Werror,-Wunused-function]
random_kern__open_and_load(void)
^
/__w/syslog-ng/syslog-ng/build/modules/ebpf/random.skel.c:109:1: error: unused function 'random_kern__attach' [-Werror,-Wunused-function]
random_kern__attach(struct random_kern *obj)
^
/__w/syslog-ng/syslog-ng/build/modules/ebpf/random.skel.c:115:1: error: unused function 'random_kern__detach' [-Werror,-Wunused-function]
random_kern__detach(struct random_kern *obj)
^

Maybe we should loosen the strictness when compiling the generated code.

@alltilla alltilla force-pushed the ebpf-randomize-udp-streams branch from 27b07fd to f62d606 Compare March 17, 2023 14:04
@alltilla
Copy link
Author

Fixed.

@bazsi bazsi force-pushed the ebpf-randomize-udp-streams branch from acf0bdf to 0b46933 Compare March 18, 2023 06:38
@bazsi
Copy link
Owner

bazsi commented Mar 19, 2023

I merged the cmake related changes with the changes I had. The rest I did on my own too, so closing this one without merging.

@bazsi bazsi closed this Mar 19, 2023
bazsi pushed a commit that referenced this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants