-
Notifications
You must be signed in to change notification settings - Fork 698
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
Support for BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG #713
Comments
5.18 added two new BTF kinds TYPE_TAG and DECL_TAG which we don't support at the moment. See cilium#713
5.18 added two new BTF kinds TYPE_TAG and DECL_TAG which we don't support at the moment. See cilium#713
With BTF-enabled kernels becoming generally available in distro's, we might need to think about tolerating/ignoring unknown types so older tools written with CO-RE are forwards-compatible with newer kernels. Time for a |
BTF isn't self describing unfortunately, so skipping unknown types is not possible. |
We need pahole >= 1.23 so it generates BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG. See cilium/ebpf#713
5.18 added two new BTF kinds TYPE_TAG and DECL_TAG which we don't support at the moment. See cilium#713
We need pahole >= 1.23 so it generates BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG. See cilium/ebpf#713
My current reading of this is that vmlinux BTF will only contain these new types if:
Not sure how many production kernels use clang instead of gcc. |
5.18 added two new BTF kinds TYPE_TAG and DECL_TAG which we don't support at the moment. See cilium#713
5.18 added two new BTF kinds TYPE_TAG and DECL_TAG which we don't support at the moment. See #713
Parse decl and type tags from BTF so that we can read BTF on new kernels. The new types are not exported since the encoding of declTag.Index especially is cumbersome to use. We can export the types later if necessary. Treat typeTag as a qualifier, since accoriding to the BTF documentation it is usually used in a chain of types: ptr -> [type_tag]* -> [const | volatile | restrict | typedef]* -> base_type Updates cilium#713
Parse decl and type tags from BTF so that we can read BTF on new kernels. The new types are not exported since the encoding of declTag.Index especially is cumbersome to use. We can export the types later if necessary. Treat typeTag as a qualifier, since accoriding to the BTF documentation it is usually used in a chain of types: ptr -> [type_tag]* -> [const | volatile | restrict | typedef]* -> base_type Updates cilium#713
Parse decl and type tags from BTF so that we can read BTF on new kernels. The new types are not exported since the encoding of declTag.Index especially is cumbersome to use. We can export the types later if necessary. Treat typeTag as a qualifier, since accoriding to the BTF documentation it is usually used in a chain of types: ptr -> [type_tag]* -> [const | volatile | restrict | typedef]* -> base_type Updates cilium#713
Parse decl and type tags from BTF so that we can read BTF on new kernels. The new types are not exported since the encoding of declTag.Index especially is cumbersome to use. We can export the types later if necessary. Treat typeTag as a qualifier, since accoriding to the BTF documentation it is usually used in a chain of types: ptr -> [type_tag]* -> [const | volatile | restrict | typedef]* -> base_type Updates cilium#713
Parse decl and type tags from BTF so that we can read BTF on new kernels. The new types are not exported since the encoding of declTag.Index especially is cumbersome to use. We can export the types later if necessary. Treat typeTag as a qualifier, since accoriding to the BTF documentation it is usually used in a chain of types: ptr -> [type_tag]* -> [const | volatile | restrict | typedef]* -> base_type Updates #713
An idea I've been kicking around: DECL_TAG and TYPE_TAG are a bit of a bodge to add stringly typed metadata to the BTF wire format. What if we didn't represent them as type Pointer struct {
...
Tags []string
} When decoding BTF we'd add TYPE_TAGs to Downsides:
|
Linux 5.18 added a two new BTF kinds DECL_TAG and TYPE_TAG. TYPE_TAG seems fine, the encoding for DECL_TAG looks like a headache.
Most relevant Linux commit: torvalds/linux@7472d5a
pahole
only generates these kinds from v1.23 onwards:clang-14
is also required: https://reviews.llvm.org/D111199btf
The text was updated successfully, but these errors were encountered: