News: 0001619627

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 7.0 Lands Improvements To Deal With Upcoming Rust Changes, Build Reproducibility

([Programming] 6 Hours Ago Linux 7.0 Rust)


Merged to mainline yesterday for [1]Linux 7.0 were yet more Rust changes in preparing for upcoming Rust releases as well as enhancing the kernel build reproducibility when engaging the Rust code.

Miguel Ojeda sent in the latest Rust toolchain and infrastructure updates, which were already merged by Linus Torvalds. This includes preparations for the upcoming Rust 1.95 to improve build reproducibility. Plus there is also another change in eyeing Rust 1.96. Additionally there are some other fixes and changes too:

"Toolchain and infrastructure:

- Remap paths to avoid absolute ones starting with the upcoming Rust 1.95.0 release. This improves build reproducibility, avoids leaking the exact path and avoids having the same path appear in two forms.

The approach here avoids remapping debug information as well, in order to avoid breaking tools that used the paths to access source files, which was the previous attempt that needed to be reverted.

- Allow 'unused_features' lint for the upcoming Rust 1.96.0 release. While well-intentioned, we do not benefit much from the new lint.

- Emit dependency information into '$(depfile)' directly to avoid a temporary '.d' file (it was an old approach).

'kernel' crate:

- 'str' module: fix warning under '!CONFIG_BLOCK' by making 'NullTerminatedFormatter' public.

- 'cpufreq' module: suppress false positive Clippy warning.

'pin-init' crate:

- Remove '#[disable_initialized_field_access]' attribute which was unsound. This means removing the support for structs with unaligned fields (through the 'repr(packed)' attribute), for now.

And document the load-bearing fact of field accessors (i.e. that they are required for soundness).

- Replace shadowed return token by 'unsafe'-to-create token in order to remain sound in the face of the likely upcoming Type Alias Impl Trait (TAIT) and the next trait solver in upstream Rust."

The code is [2]merged and in position for Linux 7.0-rc4 coming out later today.



[1] https://www.phoronix.com/search/Linux+7.0

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=267594792a71018788af69e836c52e34bb8054af



That which shrinks
Must first expand.
That which fails
Must first be strong.
That which is cast down
Must first be raised.
Before receiving
There must be giving.

This is called perception of the nature of things.
Soft and weak overcome hard and strong.

Fish cannot leave deep waters,
And a country's weapons should not be displayed.