News: 0001636931

  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.1-rc6 To Hide The Documentation On "clearcpuid" Feature

([Linux Kernel] 6 Hours Ago clearcpuid)


The clearcpuid= kernel parameter can be used to disable specific CPUID features for the kernel by specifying the targeted bit numbers of the feature(s) to disable or their flags from the /proc/cpuinfo output. The clearcpuid parameter, for example, has been useful for [1]carrying out AVX-512 comparison benchmarks for apps that check for the presence of the AVX-512 extensions via /proc/cpuinfo . But moving forward the documentation on clearcpuid is being removed to discourage its use.

The main problem with clearcpuid is that it only disables the CPUID feature for the kernel and that user-space applications calling CPUID directly or attempting to use the feature without any checks can still make use of any CPUID feature cleared by clearcpuid= . It's also possible to get the Linux kernel to malfunction if trying to disable some critical CPU features.

So to avoid situations of users not taking into account these complications with clearcpuid= , the kernel documentation on it is being removed and replaced with:

"DO NOT USE this cmdline option in production - it is meant to be used only as a quick'n'dirty debugging aid to rule out a feature-enabling code is the culprit. If you use it, it'll taint the kernel."

Borislav Petkov of AMD further added in [2]the documentation patch :

"Remove its documentation so that it doesn't get used in production and people get silly ideas. It is meant strictly for debugging; and if a chicken bit for properly disabling a feature is warranted, then that would need proper enablement."

That documentation removal is slated to happen today in Linux Git with [3]this pull request ahead of the Linux 7.1-rc6 tagging. The clearcpuid= functionality is sticking around, you just won't find it documented anymore.



[1] https://www.phoronix.com/review/amd-strix-halo-avx512

[2] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=80501dff814eeccebf44a59340c3fe3a205eb120

[3] https://lore.kernel.org/lkml/ahvbGCYlJ_x3f8XQ@gmail.com/



True leadership is the art of changing a group from what it is to what
it ought to be.
-- Virginia Allan