Skip to content

Commit

Permalink
Revert "create-diff-object: Check for *_fixup sections changes"
Browse files Browse the repository at this point in the history
We are seeing the following error on a real world patch:

  unsupported reference to special section __barrier_nospec_fixup

The kpatch commit bb444c2 ("create-diff-object: Check for *_fixup
sections changes") created this error because we were trying to be
future proof.  However, that may have been overly paranoid, as it
doesn't seem likely that those fixup sections will need relocations
anytime soon, because the replacement instructions are manually
generated in code.  And anyway that "future proof" commit breaks the
present.

Also we decided at LPC that we are going to remove .klp.arch sections
anyway, so once that happens we will be fully future-proof anyway.

This reverts commit bb444c2.

Fixes #974.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
  • Loading branch information
jpoimboe committed Sep 16, 2019
1 parent 0507ea2 commit 2499eb2
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions kpatch-build/create-diff-object.c
Expand Up @@ -82,7 +82,6 @@ enum loglevel loglevel = NORMAL;
struct special_section {
char *name;
int (*group_size)(struct kpatch_elf *kelf, int offset);
int unsupported;
};

/*************
Expand Down Expand Up @@ -1956,27 +1955,22 @@ static struct special_section special_sections[] = {
{
.name = "__ftr_fixup",
.group_size = fixup_entry_group_size,
.unsupported = 1,
},
{
.name = "__mmu_ftr_fixup",
.group_size = fixup_entry_group_size,
.unsupported = 1,
},
{
.name = "__fw_ftr_fixup",
.group_size = fixup_entry_group_size,
.unsupported = 1,
},
{
.name = "__lwsync_fixup",
.group_size = fixup_lwsync_group_size,
.unsupported = 1,
},
{
.name = "__barrier_nospec_fixup",
.group_size = fixup_barrier_nospec_group_size,
.unsupported = 1,
},
#endif
{},
Expand Down Expand Up @@ -2075,9 +2069,6 @@ static void kpatch_regenerate_special_section(struct kpatch_elf *kelf,
if (!include)
continue;

if (special->unsupported)
DIFF_FATAL("unsupported reference to special section %s", sec->base->name);

/*
* Jump labels (aka static keys or static branches) aren't
* actually supported for the time being. Warn on all
Expand Down

0 comments on commit 2499eb2

Please sign in to comment.