rust: export generated symbols
authorMiguel Ojeda <ojeda@kernel.org>
Sat, 3 Jul 2021 15:18:23 +0000 (17:18 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 11 Feb 2022 19:43:13 +0000 (20:43 +0100)
commit933a9669ef0c9163d488fb06a5530c01883d507e
treefd2d5c89d7579ba9db523c908a104e98853208d2
parent9af92b3847ba3cbc997961e8a197e0c7cda1e774
rust: export generated symbols

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.

Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/exports.c [new file with mode: 0644]