-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bindgen should be configured to use union
+ ManuallyDrop
#1137
Comments
Leaving aside the paper, as long as something is an improvement for the kernel, then we should consider it. If I understand correctly, is the suggestion to use Enabling that indeed makes struct bpf_array {
union {
struct {
struct {} __empty_value;
char value[];
};
};
}; Cc @pvdrz |
I found this is related to the rule of zero length. Any union with this pattern will not use a rust union. union {
DECLARE_FLEX_ARRAY(struct foo, foo_name);
DECLARE_FLEX_ARRAY(struct bar, bar_name);
}; |
I filed rust-lang/rust-bindgen#3130 upstream. |
Yes. Obviously if there's a bug in bindgen's support that doesn't work out that can be fixed. |
re: Richardhongyu/rfl_empirical_tools#1
re: https://www.usenix.org/system/files/atc24-li-hongyu.pdf
Researchers see that bindgen currently uses the
__BindgenUnionField
and then make logically incorrect accusations about the (in)capabilities of rustc. Accusations that nonetheless survive peer review because they were not reviewed by Rust ABI experts, precious few of those there are, because most of those people are not considered acclaimed academes. At least, not in the halls of "computer science".These researchers should be rebutted by adjusting the configuration accordingly, or else new subissues should be filed reflecting the challenges involved in doing so against rust-bindgen and/or rustc, until this issue is resolved.
The text was updated successfully, but these errors were encountered: