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 | 490 | build_kernel() { |
| 491 | 491 | local log="$TMP_DIR/build.log" |
| 492 | + local objtool_args=() | |
| 492 | 493 | local cmd=() |
| 493 | 494 | |
| 495 | + objtool_args=("--checksum") | |
| 496 | + | |
| 494 | 497 | cmd=("make") |
| 495 | 498 | |
| 496 | 499 | # When a patch to a kernel module references a newly created unexported |
| @@ -513,6 +516,7 @@ build_kernel() { · 16 unmodified lines | ||
| 513 | 516 | cmd+=("$VERBOSE") |
| 514 | 517 | cmd+=("-j$JOBS") |
| 515 | 518 | cmd+=("KCFLAGS=-ffunction-sections -fdata-sections") |
| 519 | + cmd+=("OBJTOOL_ARGS=${objtool_args[*]}") | |
| 516 | 520 | cmd+=("vmlinux") |
| 517 | 521 | cmd+=("modules") |
| 518 | 522 | |