-
Notifications
You must be signed in to change notification settings - Fork 2k
chore(bindgen): upgrade to linux 6.12 headers and use single kernel tree #5352
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
chore(bindgen): upgrade to linux 6.12 headers and use single kernel tree #5352
Conversation
2874de2
to
4d13dc8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5352 +/- ##
==========================================
+ Coverage 82.30% 82.35% +0.04%
==========================================
Files 265 265
Lines 30640 30645 +5
==========================================
+ Hits 25219 25238 +19
+ Misses 5421 5407 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We were using bindgen from 3 different sources: - installed headers in the system - linux-5.10.y branch from amazonlinux repo - linux-next branch from torvalds repo This is overcomplicated and unnecessary as Linux doesn't break the UAPI. This patch updates it to use a single stable branch (6.12), from which the user headers are generated using `make headers_install` and regenerates all the headers, fixing some minor incompatibilities in the syntax. While I was at it I also improved the generation for C enums to use constified-enum-module style which is less verbose. I had to fix an issue with the io_uring auto-generated structs not implementing Copy due to FAM introduced in the latest kernels. I have put a bindgen-patch to drop the FAM and derive Copy and Clone where required to implement ByteValued. If we ever need to use those fields, we'll need to find a different solution. Signed-off-by: Riccardo Mancini <[email protected]>
4d13dc8
to
7c8f7c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ran it locally, and everything worked!
Reason
I was looking into adding bindings for
virtio-mem
in the feature branch and realized we were using bindgen from 3 different sources:This is overcomplicated and unnecessary as Linux doesn't break the UAPI.
Changes
This patch updates it to use a single stable branch (6.12), from which the user headers are generated using
make headers_install
and regenerates all the headers, fixing some minor incompatibilities in the syntax.While I was at it I also improved the generation for C enums to use constified-enum-module style which is less verbose.
I had to fix an issue with the io_uring auto-generated structs not implementing Copy due to FAM introduced in the latest kernels. I have put a bindgen-patch to drop the FAM and derive Copy and Clone where required to implement ByteValued. If we ever need to use those fields, we'll need to find a different solution.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkbuild --all
to verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.