Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

livepatch/klp-build: provide friendlier error messages

Provide more context for common klp-build failure modes. Clarify which
user-provided patch is unsupported or failed to apply, and explicitly
identify which kernel build (original or patched) failed.

Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Link: https://patch.msgid.link/20260310203751.1479229-11-joe.lawrence@redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

authored by

Joe Lawrence and committed by
Josh Poimboeuf
b41d8b7d e506ad21

+5 -4
+5 -4
scripts/livepatch/klp-build
··· 342 342 for file in "${files[@]}"; do 343 343 case "$file" in 344 344 lib/*|*.S) 345 - die "unsupported patch to $file" 345 + die "${patch}: unsupported patch to $file" 346 346 ;; 347 347 esac 348 348 done ··· 487 487 } 488 488 489 489 build_kernel() { 490 + local build="$1" 490 491 local log="$TMP_DIR/build.log" 491 492 local objtool_args=() 492 493 local cmd=() ··· 525 524 "${cmd[@]}" \ 526 525 1> >(tee -a "$log") \ 527 526 2> >(tee -a "$log" | grep0 -v "modpost.*undefined!" >&2) 528 - ) 527 + ) || die "$build kernel build failed" 529 528 } 530 529 531 530 find_objects() { ··· 800 799 if (( SHORT_CIRCUIT <= 1 )); then 801 800 status "Building original kernel" 802 801 clean_kernel 803 - build_kernel 802 + build_kernel "original" 804 803 status "Copying original object files" 805 804 copy_orig_objects 806 805 fi ··· 810 809 fix_patches 811 810 apply_patches 812 811 status "Building patched kernel" 813 - build_kernel 812 + build_kernel "patched" 814 813 revert_patches 815 814 status "Copying patched object files" 816 815 copy_patched_objects