mirror of
https://github.com/dynup/kpatch
synced 2025-01-11 15:49:26 +00:00
Merge pull request #114 from spartacus06/reject-init-changes
fail if init section has changed
This commit is contained in:
commit
dd204989e6
@ -497,13 +497,19 @@ void kpatch_compare_correlated_section(struct section *sec)
|
||||
if (sec1->sh.sh_size != sec2->sh.sh_size ||
|
||||
sec1->data->d_size != sec2->data->d_size) {
|
||||
sec->status = CHANGED;
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (is_rela_section(sec))
|
||||
kpatch_compare_correlated_rela_section(sec);
|
||||
else
|
||||
kpatch_compare_correlated_nonrela_section(sec);
|
||||
out:
|
||||
if (sec->status == CHANGED) {
|
||||
log_debug("section %s has changed\n", sec->name);
|
||||
if (!strcmp(sec->name, ".init.text"))
|
||||
DIFF_FATAL("init section has changed");
|
||||
}
|
||||
}
|
||||
|
||||
void kpatch_compare_sections(struct table *table)
|
||||
|
Loading…
Reference in New Issue
Block a user