Skip to content

Rust: support `CPU_MITIGATIONS` and enable `objtool`

Miguel Ojeda linux-kbuild linux-patches lkml rust-for-linux 2 versions – Applied

Status from this message: Applied to `rust-next` -- thanks everyone!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 9 repliesApplied
  2. v26 patches 15 repliesSuperseded

Changes in v3 from the cover letter

- Added is_rust_noreturn() helper function (Peter).
- Reworded a couple bits.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/6rust: module: add static pointer to `{init,cleanup}_module()`rust/macros/module.rs+12 -01 reply
2/6x86/rust: support MITIGATION_RETPOLINEarch/x86/Makefile scripts/generate_rust_target.rs+8 -10 replies
3/6x86/rust: support MITIGATION_RETHUNKarch/x86/Makefile+5 -01 reply
4/6x86/rust: support MITIGATION_SLSscripts/generate_rust_target.rs+8 -00 replies
5/6objtool/rust: list `noreturn` Rust functionstools/objtool/check.c tools/objtool/noreturns.h+49 -15 replies
6/6objtool/kbuild/rust: enable objtool for Rustrust/Makefile scripts/Makefile.build+21 -100 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchAlice RyhlBenno LossinGary GuoPeter Zijlstra (Intel)Kees CookThomas Gleixner
SeriesT-b
1/6T-b T-b R-b
2/6T-b T-b R-b
3/6T-b T-b R-b R-b
4/6T-b T-b R-b
5/6T-b A-b R-b
6/6T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/6] Rust: support `CPU_MITIGATIONS` and enable `objtool`

Hi,

This is just v2 with the helper function suggested by Peter.

I dropped Benno's and Alice's Tested-bys from the modified patch, just in case, but the logic should be equivalent.

Cheers,
Miguel

v3:
- Added is_rust_noreturn() helper function (Peter).
- Reworded a couple bits.

v2: https://lore.kernel.org/rust-for-linux/[email protected]/
v1: https://lore.kernel.org/rust-for-linux/[email protected]/

Miguel Ojeda (6):
rust: module: add static pointer to {init,cleanup}_module() x86/rust: support MITIGATION_RETPOLINE
x86/rust: support MITIGATION_RETHUNK
x86/rust: support MITIGATION_SLS
objtool/rust: list noreturn Rust functions objtool/kbuild/rust: enable objtool for Rust

 arch/x86/Makefile               |  7 ++++-
 rust/Makefile                   | 22 +++++++++------
 rust/macros/module.rs           | 12 +++++++++
 scripts/Makefile.build          |  9 +++++--
 scripts/generate_rust_target.rs | 15 +++++++++++
 tools/objtool/check.c           | 48 ++++++++++++++++++++++++++++++++-
 tools/objtool/noreturns.h       |  2 ++
 7 files changed, 103 insertions(+), 12 deletions(-)

base-commit: b1263411112305acf2af728728591465becb45b0 --
2.45.2