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

build: add minimum vmlinux.h and uapi headers #288

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Feb 8, 2023

commit def1753

install headers required for selftests

In file included from main.bpf.c:2:
In file included from ../../output/uapi/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not
found

commit a8c4d91

build: add minimum vmlinux.h and uapi headers

- Add caped vmlinux.h and uapi headers that are needed to compile
  bpf selftests.
- uapi headers also provide exclusive definitions that are not available
  in the libbpf internal headers.
- Add a new makefile target to generate uapi headers.
- Remove bpftool dependency from Makefile.

Fixes: #242

@geyslan geyslan added the feature New feature or request label Feb 8, 2023
@geyslan geyslan requested a review from rafaeldtinoco February 8, 2023 22:35
@geyslan geyslan self-assigned this Feb 8, 2023
@geyslan geyslan force-pushed the 242-make-uapi-vmlinux branch 2 times, most recently from 276d271 to 4127c71 Compare February 8, 2023 22:42
@geyslan geyslan force-pushed the 242-make-uapi-vmlinux branch 4 times, most recently from 97ddaf7 to def1753 Compare February 9, 2023 00:30
@geyslan geyslan marked this pull request as ready for review February 9, 2023 00:36
@geyslan
Copy link
Member Author

geyslan commented Feb 9, 2023

@rafaeldtinoco 🙏🏼

@geyslan geyslan force-pushed the 242-make-uapi-vmlinux branch from def1753 to af0943e Compare February 9, 2023 00:38
- Add caped vmlinux.h and uapi headers that are needed to compile
  bpf selftests.
- uapi headers also provide exclusive definitions that are not available
  in the libbpf internal headers.
- Add a new makefile target to generate uapi headers.
- Remove bpftool dependency from Makefile.
In file included from main.bpf.c:2:
In file included from ../../output/uapi/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not
found
@geyslan geyslan force-pushed the 242-make-uapi-vmlinux branch from af0943e to e77c2da Compare February 9, 2023 00:45
Copy link
Contributor

@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@rafaeldtinoco rafaeldtinoco merged commit 966e9a9 into aquasecurity:main Feb 20, 2023
@geyslan geyslan deleted the 242-make-uapi-vmlinux branch March 31, 2023 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make a pre-made vmlinux.h available in tree
2 participants