Skip to content

Commit

Permalink
kpatch-build: handle paravirt absence in Linux v6.8+
Browse files Browse the repository at this point in the history
Adds linux kernel version checks to all functions pertaining to struct
paravirt_patch_site as it is removed in Linux v6.8+

Fixes: dynup#1380

Signed-off-by: Ryan Sullivan <[email protected]>
  • Loading branch information
ryanbsull committed May 3, 2024
1 parent ef68b4e commit 6fe14ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ find_special_section_data() {
"x86_64")
check[a]=true # alt_instr
kernel_version_gte 5.10.0 && check[s]=true # static_call_site
[[ -n "$CONFIG_PARAVIRT" ]] && check[p]=true # paravirt_patch_site
[[ -n "$CONFIG_PARAVIRT" ]] && ! kernel_version_gte 6.8.0 && check[p]=true # paravirt_patch_site
;;
"ppc64le")
check[f]=true # fixup_entry
Expand Down Expand Up @@ -438,7 +438,7 @@ 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"
[[ ${check[p]} && -z "$PARA_STRUCT_SIZE" ]] && ! kernel_version_gte 6.8.0 && die "can't find special struct paravirt_patch_site size"
[[ ${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 6fe14ce

Please sign in to comment.