<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/rust/exports.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-12-04T00:59:16+00:00</updated>
<entry>
<title>rust: add `build_error` crate</title>
<updated>2022-12-04T00:59:16+00:00</updated>
<author>
<name>Gary Guo</name>
<email>gary@garyguo.net</email>
</author>
<published>2022-11-10T16:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecaa6ddff2fd843c0236a931bcc62bf239956617'/>
<id>urn:sha1:ecaa6ddff2fd843c0236a931bcc62bf239956617</id>
<content type='text'>
The `build_error` crate provides a function `build_error` which
will panic at compile-time if executed in const context and,
by default, will cause a build error if not executed at compile
time and the optimizer does not optimise away the call.

The `CONFIG_RUST_BUILD_ASSERT_ALLOW` kernel option allows to
relax the default build failure and convert it to a runtime
check. If the runtime check fails, `panic!` will be called.

Its functionality will be exposed to users as a couple macros in
the `kernel` crate in the following patch, thus some documentation
here refers to them for simplicity.

Signed-off-by: Gary Guo &lt;gary@garyguo.net&gt;
Reviewed-by: Wei Liu &lt;wei.liu@kernel.org&gt;
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: export generated symbols</title>
<updated>2022-09-28T06:59:52+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2021-07-03T15:18:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8fcbf024920b96cd8c59f85d57d97af7237237b4'/>
<id>urn:sha1:8fcbf024920b96cd8c59f85d57d97af7237237b4</id>
<content type='text'>
All symbols are reexported reusing the `EXPORT_SYMBOL_GPL` macro
from C. The lists of symbols are generated on the fly.

There are three main sets of symbols to distinguish:

  - The ones from the `core` and `alloc` crates (from the Rust
    standard library). The code is licensed as Apache/MIT.

  - The ones from our abstractions in the `kernel` crate.

  - The helpers (already exported since they are not generated).

We export everything as GPL. This ensures we do not mistakenly
expose GPL kernel symbols/features as non-GPL, even indirectly.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Co-developed-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Signed-off-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Co-developed-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Co-developed-by: Björn Roy Baron &lt;bjorn3_gh@protonmail.com&gt;
Signed-off-by: Björn Roy Baron &lt;bjorn3_gh@protonmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
