]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r340009:
authorbz <bz@FreeBSD.org>
Sun, 4 Nov 2018 06:25:07 +0000 (06:25 +0000)
committerbz <bz@FreeBSD.org>
Sun, 4 Nov 2018 06:25:07 +0000 (06:25 +0000)
commitaf3cdf25a6cb93a3abf5bbdb813c9cf4ddd59c6f
treedb8ea439367607a2454b986b2662159bb3828c40
parented8abff2f1750f3773c59f16985e370f03f9798f
MFC r340009:

  carpstats are the last virtualised variable in the file and end up at the
  end of the vnet_set.  The generated code uses an absolute relocation at
  one byte beyond the end of the carpstats array.  This means the relocation
  for the vnet does not happen for carpstats initialisation and as a result
  the kernel panics on module load.

  This problem has only been observed with carp and only on i386.
  We considered various possible solutions including using linker scripts
  to add padding to all kernel modules for pcpu and vnet sections.

  While the symbols (by chance) stay in the order of appearance in the file
  adding an unused non-file-local variable at the end of the file will extend
  the size of set_vnet and hence make the absolute relocation for carpstats
  work (think of this as a single-module set_vnet padding).

  This is a (tmporary) hack.  It is the least intrusive one as we need a
  timely solution for the upcoming release.  We will revisit the problem in
  HEAD.  For a lot more information and the possible alternate solutions
  please see the PR and the references therein.

PR: 230857
Approved by: re (kib)
sys/netinet/ip_carp.c