Commit 0e1329d4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull rust fixes from Miguel Ojeda:

 - Make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88.0

 - Clean Rust (and Clippy) lints for the upcoming Rust 1.87.0 and 1.88.0
   releases

 - Clean objtool warning for the upcoming Rust 1.87.0 release by adding
   one more noreturn function

* tag 'rust-fixes-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88
  rust: clean Rust 1.88.0's `clippy::uninlined_format_args` lint
  rust: clean Rust 1.88.0's warning about `clippy::disallowed_macros` configuration
  rust: clean Rust 1.88.0's `unnecessary_transmutes` lint
  rust: allow Rust 1.87.0's `clippy::ptr_eq` lint
  objtool/rust: add one more `noreturn` Rust function for Rust 1.87.0
parents ea34704d 5595c31c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,5 +7,5 @@ check-private-items = true
disallowed-macros = [
    # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate
    # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303.
    { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool" },
    { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true },
]
+1 −0
Original line number Diff line number Diff line
@@ -2368,6 +2368,7 @@ config STRICT_SIGALTSTACK_SIZE
config CFI_AUTO_DEFAULT
	bool "Attempt to use FineIBT by default at boot time"
	depends on FINEIBT
	depends on !RUST || RUSTC_VERSION >= 108800
	default y
	help
	  Attempt to use FineIBT by default at boot time. If enabled,
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ pub(crate) fn arch(&self) -> Architecture {
// For now, redirect to fmt::Debug for convenience.
impl fmt::Display for Chipset {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{:?}", self)
        write!(f, "{self:?}")
    }
}

+3 −0
Original line number Diff line number Diff line
@@ -140,6 +140,9 @@ config LD_CAN_USE_KEEP_IN_OVERLAY
config RUSTC_HAS_COERCE_POINTEE
	def_bool RUSTC_VERSION >= 108400

config RUSTC_HAS_UNNECESSARY_TRANSMUTES
	def_bool RUSTC_VERSION >= 108800

config PAHOLE_VERSION
	int
	default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE))
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#[allow(dead_code)]
#[allow(clippy::undocumented_unsafe_blocks)]
#[cfg_attr(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES, allow(unnecessary_transmutes))]
mod bindings_raw {
    // Manual definition for blocklisted types.
    type __kernel_size_t = usize;
Loading