mirror of
https://github.com/dynup/kpatch
synced 2025-04-07 17:51:26 +00:00
kpatch: don't complain about missing livepatch .kpatch.checksum
The verify_module_checksum() function reads a kpatch-specific ELF section to compare on-disk and in-memory kernel modules. The function only reports a miscompare if the .kpatch.checksum section actually exists. Livepatches don't have such section, so throw away any "Section '.kpatch.checksum' was not dumped because it does not exist!" warnings from readelf. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
parent
64ba06606f
commit
a2fbce1587
@ -145,7 +145,7 @@ verify_module_checksum () {
|
||||
modname="$(get_module_name "$1")"
|
||||
[[ -z "$modname" ]] && return 1
|
||||
|
||||
checksum="$(readelf -p .kpatch.checksum "$1" | grep '\[.*\]' | awk '{print $3}')"
|
||||
checksum="$(readelf -p .kpatch.checksum "$1" 2>&1 | grep '\[.*\]' | awk '{print $3}')"
|
||||
|
||||
# Fail checksum match only if both exist and diverge
|
||||
if [[ ! -z "$checksum" ]] && [[ -e "$SYSFS/${modname}/checksum" ]] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user