With CONFIG_KLP_BUILD enabled, checksums are only needed during a klp-build run. There's no need to enable them for normal kernel builds. This also has the benefit of softening the xxhash dependency.
Showing the changes to scripts/livepatch (1 of 3 files). Show all
Unified · Split
| @@ -489,8 +489,11 @@ clean_kernel() { · 488 unmodified lines | |||
| 489 | 489 | ||
| 490 | build_kernel() { | 490 | build_kernel() { |
| 491 | local log="$TMP_DIR/build.log" | 491 | local log="$TMP_DIR/build.log" |
| 492 | local objtool_args=() | ||
| 492 | local cmd=() | 493 | local cmd=() |
| 493 | 494 | ||
| 495 | objtool_args=("--checksum") | ||
| 496 | |||
| 494 | cmd=("make") | 497 | cmd=("make") |
| 495 | 498 | ||
| 496 | # When a patch to a kernel module references a newly created unexported | 499 | # When a patch to a kernel module references a newly created unexported |
| @@ -513,6 +516,7 @@ build_kernel() { · 16 unmodified lines | |||
| 513 | cmd+=("$VERBOSE") | 516 | cmd+=("$VERBOSE") |
| 514 | cmd+=("-j$JOBS") | 517 | cmd+=("-j$JOBS") |
| 515 | cmd+=("KCFLAGS=-ffunction-sections -fdata-sections") | 518 | cmd+=("KCFLAGS=-ffunction-sections -fdata-sections") |
| 519 | cmd+=("OBJTOOL_ARGS=${objtool_args[*]}") | ||
| 516 | cmd+=("vmlinux") | 520 | cmd+=("vmlinux") |
| 517 | cmd+=("modules") | 521 | cmd+=("modules") |
| 518 | 522 | ||