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

program: fix LINUX_HAS_SYSCALL_WRAPPER use with bpf_tracing.h #1202

Merged

Conversation

paulcacheux
Copy link
Contributor

@paulcacheux paulcacheux commented Nov 3, 2023

We currently enforces that LINUX_HAS_SYSCALL_WRAPPER be an uint32 integer. On the other hand libbpf supports a larger set of integer sizes, including support for _Bool.

This PR implements the same support for multiple integer size (from 1 to 8 bytes)

@paulcacheux paulcacheux force-pushed the paulcacheux/fix-has-syscall-wrapper-fix branch from 754985e to a9b9108 Compare November 3, 2023 15:16
@paulcacheux paulcacheux marked this pull request as ready for review November 3, 2023 15:24
This follows what libbpf does for kconfig values in general.

Signed-off-by: Paul Cacheux <paul.cacheux@datadoghq.com>
@lmb lmb force-pushed the paulcacheux/fix-has-syscall-wrapper-fix branch from a9b9108 to fc48919 Compare November 7, 2023 10:58
@lmb lmb changed the title fix LINUX_HAS_SYSCALL_WRAPPER integer size program: fix LINUX_HAS_SYSCALL_WRAPPER use with bpf_tracing.h Nov 7, 2023
@lmb
Copy link
Collaborator

lmb commented Nov 7, 2023

Squashed your commits (so that we don't get broken tests if we ever need to bisect) and re-factored a bit to just use code from kconfig we already have.

Export a function from the kconfig package which allows writing an
integer into a slice based on a btf.Int.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the paulcacheux/fix-has-syscall-wrapper-fix branch from fc48919 to 17cbf79 Compare November 7, 2023 11:02
@paulcacheux
Copy link
Contributor Author

That's perfect thanks !

@lmb lmb merged commit c2563e4 into cilium:main Nov 7, 2023
12 checks passed
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