locking/atomics: Check atomic headers with sha1sum
We currently check the atomic headers at build-time to ensure they
haven't been modified directly, and these checks require regenerating
the headers in full. As this takes a few seconds, even when
parallelized, this is too slow to run for every kernel build.
Instead, we can generate a hash of each header as we generate them,
which we can cheaply check at build time (~0.16s for all headers).
This patch does so, updating headers with their hashes using the new
gen-atomics.sh script. As some users apparently build the kernel wihout
coreutils, lacking sha1sum, the checks are skipped in this case.
Presumably, most developers have a working coreutils installation.
Signed-off-by: Mark Rutland <email@example.com>
Acked-by: Will Deacon <firstname.lastname@example.org>
Cc: Andrew Morton <email@example.com>
Cc: Boqun Feng <firstname.lastname@example.org>
Cc: Linus Torvalds <email@example.com>
Cc: Peter Zijlstra <firstname.lastname@example.org>
Cc: Thomas Gleixner <email@example.com>
Signed-off-by: Ingo Molnar <firstname.lastname@example.org>
5 files changed