]> xenbits.xensource.com Git - livepatch-build-tools.git/commitdiff
Remove section alignment requirement
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Mon, 24 Apr 2017 12:57:57 +0000 (13:57 +0100)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Mon, 12 Jun 2017 07:27:39 +0000 (08:27 +0100)
Remove the requirement that section twins (i.e. functions) have the same
alignment. The section alignment of the patched section is respected by
the loader in Xen so it shouldn't matter if the original section
alignment was different.

This was discovered when building a live patch for XSA-213. For reasons
known only to the compiler, the alignment of arch_do_multicall_call()
changed from 1 to 16. This should not prevent the build tools from
generating a live patch.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
create-diff-object.c

index ba19daf4fd9b20aaa3911ee7dbf7f27d9ce3343c..82f777eef83b05cad5896b647495cf7326038556 100644 (file)
@@ -754,7 +754,6 @@ static void kpatch_compare_correlated_section(struct section *sec)
        if (sec1->sh.sh_type != sec2->sh.sh_type ||
            sec1->sh.sh_flags != sec2->sh.sh_flags ||
            sec1->sh.sh_addr != sec2->sh.sh_addr ||
-           sec1->sh.sh_addralign != sec2->sh.sh_addralign ||
            sec1->sh.sh_entsize != sec2->sh.sh_entsize)
                DIFF_FATAL("%s section header details differ", sec1->name);