You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.
It would be awesome if we could #define them in a way that bindgen could pass to Rust, such that you couldn't dereference a __rcu or __user pointer directly (note the noderef definition in sparse) and ideally so that there's a defined constructor from an __rcu raw pointer to an Rcu<T> or whatever but not from other raw pointers.
I'm also curious about the locking stuff, though that seems to be for what locks are expected to be held/acquired/released when you call a function, not for describing locks on data.
The text was updated successfully, but these errors were encountered:
Apparently Clang supports __attribute__((annotate("some arbitrary text here"))) and assigns no meaning of it. If that gets through to the level that bindgen is looking at, we can probably teach bindgen to newtype the user/percpu/rcu/private pointers so they can't be dereferenced.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In include/linux/compiler_types.h there are annotations for the Sparse static type checker like
They're used in ways like
It would be awesome if we could
#define
them in a way that bindgen could pass to Rust, such that you couldn't dereference a__rcu
or__user
pointer directly (note thenoderef
definition in sparse) and ideally so that there's a defined constructor from an__rcu
raw pointer to anRcu<T>
or whatever but not from other raw pointers.I'm also curious about the locking stuff, though that seems to be for what locks are expected to be held/acquired/released when you call a function, not for describing locks on data.
The text was updated successfully, but these errors were encountered: