Skip to content

Commit

Permalink
kpatch-build: Ignore missing PARA_STRUCT_SIZE for 6.8.0+ kernels
Browse files Browse the repository at this point in the history
struct paravirt_patch_site was removed in 6.8.0+ kernels. We should not
fail kpatch-build for missing PARA_STRUCT_SIZE.

Signed-off-by: Song Liu <[email protected]>
  • Loading branch information
liu-song-6 committed Jun 6, 2024
1 parent 6457c4c commit 2c5694f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ support_klp_replace()
fi
}

check_paravirt_patch_site()
{
! kernel_version_gte 6.8.0
}

find_dirs() {
if [[ -e "$SCRIPTDIR/create-diff-object" ]]; then
# git repo
Expand Down Expand Up @@ -462,7 +467,9 @@ find_special_section_data() {
[[ ${check[i]} && -z "$PRINTK_INDEX_STRUCT_SIZE" ]] && die "can't find special struct pi_entry size"
[[ ${check[j]} && -z "$JUMP_STRUCT_SIZE" ]] && die "can't find special struct jump_entry size"
[[ ${check[o]} && -z "$ORC_STRUCT_SIZE" ]] && die "can't find special struct orc_entry size"
[[ ${check[p]} && -z "$PARA_STRUCT_SIZE" ]] && die "can't find special struct paravirt_patch_site size"
if check_paravirt_patch_site; then
[[ ${check[p]} && -z "$PARA_STRUCT_SIZE" ]] && die "can't find special struct paravirt_patch_site size"
fi
[[ ${check[s]} && -z "$STATIC_CALL_STRUCT_SIZE" ]] && die "can't find special struct static_call_site size"

save_env
Expand Down

0 comments on commit 2c5694f

Please sign in to comment.