freebsd-dev/sys/conf
Bjoern A. Zeeb 4c62bffef5 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
2019-06-08 17:44:42 +00:00
..
config.mk Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
dtb.build.mk fdt: Fix installation of aarch64 dtb 2019-05-02 16:56:03 +00:00
dtb.mk Allow kernel config to specify DTS/DTSO to build, and out-of-tree support 2019-03-26 02:45:23 +00:00
files Remove extra stray + from a diff from the beginning of the lines after 2019-06-08 17:38:27 +00:00
files.amd64 random(4): Fix RANDOM_LOADABLE build 2019-06-01 01:22:21 +00:00
files.arm Implement the ffs and fls functions, and their longer counterparts, in 2019-05-28 15:47:00 +00:00
files.arm64 random(4): Fix RANDOM_LOADABLE build 2019-06-01 01:22:21 +00:00
files.i386 random(4): Fix RANDOM_LOADABLE build 2019-06-01 01:22:21 +00:00
files.mips Move scterm_teken.c from 6 MD files lists to the MI files list so that it 2019-02-21 17:31:33 +00:00
files.powerpc random(4): Fix RANDOM_LOADABLE build 2019-06-01 01:22:21 +00:00
files.riscv Connect Xilinx AXI drivers and Cadence Ethernet MAC to the RISC-V build. 2019-05-08 16:06:54 +00:00
files.sparc64 Move scterm_teken.c from 6 MD files lists to the MI files list so that it 2019-02-21 17:31:33 +00:00
kern.mk kernel build: Disable unhelpful GCC warning (tripped after r346352) 2019-04-19 20:08:45 +00:00
kern.opts.mk Fix several places where tool name has been hardcoded: 2019-06-02 23:38:19 +00:00
kern.post.mk Fix build race with machine links and genoffset.o. 2019-05-10 18:09:27 +00:00
kern.pre.mk Specify -z notext when building with -z ifunc-noplt. 2019-05-14 18:26:39 +00:00
kmod_syms_prefix.awk Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
kmod_syms.awk
kmod.mk Fix dpcpu and vnet panics with complex types at the end of the section. 2019-06-08 17:44:42 +00:00
ldscript.amd64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.arm Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.arm64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.i386 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.cfe Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.mips64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.mips.octeon1 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.powerpc Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.powerpc64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.powerpcspe Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.riscv Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.set_padding Fix dpcpu and vnet panics with complex types at the end of the section. 2019-06-08 17:44:42 +00:00
ldscript.sparc64 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
Makefile.amd64 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.arm Only build the cache handling code we need when building the arm ELF 2018-07-28 12:50:09 +00:00
Makefile.arm64 Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.i386 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.mips Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.powerpc Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.riscv Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.sparc64 Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
makeLINT.mk Remove the mlx5 driver from LINT kernel config for 32-bit PPC 2018-05-30 02:26:36 +00:00
makeLINT.sed
newvers.sh Defer evaluation of modified until after it's set 2019-05-31 22:57:20 +00:00
NOTES FCP-101: Remove xe(4) 2019-05-17 15:24:44 +00:00
options Add a COMPAT_FREEBSD12 kernel option. 2019-05-02 18:10:23 +00:00
options.amd64 Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
options.arm Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for 2018-07-28 11:00:45 +00:00
options.arm64 arm64: Add new SoC type MARVELL_8K 2018-12-12 21:58:30 +00:00
options.i386 i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
options.mips Add SMP support for BERI CPU. 2018-04-12 17:43:19 +00:00
options.powerpc Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
options.riscv o Add driver for PLIC (Platform-Level Interrupt Controller) device. 2018-06-12 17:45:15 +00:00
options.sparc64
systags.sh sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE Remove adv(4) and adw(4) 2018-10-22 02:34:47 +00:00