Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Jun 2019 17:44:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 230857] loading carp module panic i386 kernel (VIMAGE related)
Message-ID:  <bug-230857-29464-NftcjTbLam@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-230857-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-230857-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230857

--- Comment #12 from commit-hook@freebsd.org ---
A commit references this bug:

Author: bz
Date: Sat Jun  8 17:44:43 UTC 2019
New revision: 348808
URL: https://svnweb.freebsd.org/changeset/base/348808

Log:
  Fix dpcpu and vnet panics with complex types at the end of the section.

  Apply a linker script when linking i386 kernel modules to apply padding
  to a set_pcpu or set_vnet section.  The padding value is kind-of random
  and is used to catch modules not compiled with the linker-script, so
  possibly still having problems leading to kernel panics.

  This is needed as the code generated on certain architectures for
  non-simple-types, e.g., an array can generate an absolute relocation
  on the edge (just outside) the section and thus will not be properly
  relocated. Adding the padding to the end of the section will ensure
  that even absolute relocations of complex types will be inside the
  section, if they are the last object in there and hence relocation will
  work properly and avoid panics such as observed with carp.ko or ipsec.ko.

  There is a rather lengthy discussion of various options to apply in
  the mentioned PRs and their depends/blocks, and the review.
  There seems no best solution working across multiple toolchains and
  multiple version of them, so I took the liberty of taking one,
  as currently our users (and our CI system) are hitting this on
  just i386 and we need some solution.  I wish we would have a proper
  fix rather than another "hack".

  Also backout r340009 which manually, temporarily fixed CARP before 12.0-R
  "by chance" after a lead-up of various other link-elf.c and related fixes.

  PR:                   230857,238012
  With suggestions from:        arichardson (originally last year)
  Tested by:            lwhsu
  Event:                        Waterloo Hackathon 2019
  Reported by:          lwhsu, olivier
  MFC after:            6 weeks
  Differential Revision:        https://reviews.freebsd.org/D17512

Changes:
  head/UPDATING
  head/sys/conf/kmod.mk
  head/sys/conf/ldscript.set_padding
  head/sys/kern/link_elf.c
  head/sys/netinet/ip_carp.c
  head/sys/sys/param.h

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230857-29464-NftcjTbLam>