On 8/16/19 1:06 PM, Wieczorkiewicz, Pawel wrote:

On 16. Aug 2019, at 11:40, Ross Lagerwall <ross.lagerw...@citrix.com <mailto:ross.lagerw...@citrix.com>> wrote:

On 8/8/19 1:35 PM, Pawel Wieczorkiewicz wrote:


…snip...

  * The rela groups in the .fixup section vary in size.  The beginning of each   * .fixup rela group is referenced by the .ex_table section. To find the size @@ -1072,6 +1090,18 @@ static struct special_section special_sections[] = {
.name= ".altinstructions",
.group_size= altinstructions_group_size,
},
+{
+.name= ".altinstr_replacement",
+.group_size= undefined_group_size,
+},
+{
+.name= ".livepatch.hooks.load",
+.group_size= livepatch_hooks_group_size,
+},
+{
+.name= ".livepatch.hooks.unload",
+.group_size= livepatch_hooks_group_size,
+},
{},
 };


Unless I'm misunderstanding something, I can't see how kpatch_regenerate_special_section would work with .altinstr_replacement having a group size of 0. It looks to me like the for loop in that function would become an infinite loop (due to incrementing by group_size) and should_keep_rela_group would always return false.


AFAICS, the group_size 0 sections are never actually processed by the kpatch_regenerate_special_section(). They are not RELA sections and the following check excludes them from this processing:

OK, that makes sense.

Thanks,
--
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to