mirror of
https://github.com/dynup/kpatch
synced 2024-12-28 08:12:01 +00:00
kmod/core: make dynrelas section writable
On RHEL 7, the core module's write to dynrela->src causes a panic because the dynrela section is read-only.
This commit is contained in:
parent
844af68115
commit
bba8d1cc2b
@ -1660,7 +1660,7 @@ void kpatch_create_dynamic_rela_sections(struct kpatch_elf *kelf,
|
|||||||
sec->sh.sh_type = SHT_PROGBITS;
|
sec->sh.sh_type = SHT_PROGBITS;
|
||||||
sec->sh.sh_entsize = sizeof(*dynrelas);
|
sec->sh.sh_entsize = sizeof(*dynrelas);
|
||||||
sec->sh.sh_addralign = 8;
|
sec->sh.sh_addralign = 8;
|
||||||
sec->sh.sh_flags = SHF_ALLOC;
|
sec->sh.sh_flags = SHF_ALLOC | SHF_WRITE;
|
||||||
|
|
||||||
/* create .rela.kpatch.dynrelas*/
|
/* create .rela.kpatch.dynrelas*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user