mirror of https://github.com/dynup/kpatch
create-diff-object: Support for __warned placed in .data.once
With kernel commit b1fca27d384 ("kernel debug: support resetting WARN*_ONCE") the *_ONCE warnings are placed .data.once section. Including .data.once section is valid, so add an check in kpatch_verify_patchability() while checking for included invalid sections. Cc: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This commit is contained in:
parent
cac608a05a
commit
481d8c4bc2
|
@ -1296,12 +1296,11 @@ static void kpatch_verify_patchability(struct kpatch_elf *kelf)
|
|||
|
||||
/*
|
||||
* ensure we aren't including .data.* or .bss.*
|
||||
* (.data.unlikely is ok b/c it only has __warned vars)
|
||||
* (.data.unlikely and .data.once is ok b/c it only has __warned vars)
|
||||
*/
|
||||
if (sec->include && sec->status != NEW &&
|
||||
(!strncmp(sec->name, ".data", 5) ||
|
||||
!strncmp(sec->name, ".bss", 4)) &&
|
||||
strcmp(sec->name, ".data.unlikely")) {
|
||||
(!strncmp(sec->name, ".data", 5) || !strncmp(sec->name, ".bss", 4)) &&
|
||||
(strcmp(sec->name, ".data.unlikely") && strcmp(sec->name, ".data.once"))) {
|
||||
log_normal("data section %s selected for inclusion\n",
|
||||
sec->name);
|
||||
errs++;
|
||||
|
|
Loading…
Reference in New Issue