[Bug 230857] loading carp module panic i386 kernel (VIMAGE related)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 5 19:57:08 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230857

Bjoern A. Zeeb <bz at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Open                        |In Progress

--- Comment #4 from Bjoern A. Zeeb <bz at FreeBSD.org> ---
Ok, so the short explanation is that having a non-simple-type at the end of the
dpcpu or vnet linker sets and an intelligent compiler/linker combination can
result in the last symbol not being relocated.  In the case of i386/carp this
was the PCPU stats glebius introduced which is an array of 16 pointers.

I've spent a day to think of possible work around and the only one was to add
padding to the end of the section;  with the help of arichardson managed to
work my way around linker scripts and with an extra 8 hours I have a dual-stage
linker-script solution which will only adjust the kernel modules which actually
do have a vnet_set or pcpu_set section and not create one in every module with
the size of 1 byte.

I'll write the entire details up including sample code and the hacked up
prototype solution and post it all here and in phab sometime the next days
(possibly after the weekend).

TODO: investigate which other architectures but i386 are possibly affected by
this as well.

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


More information about the freebsd-toolchain mailing list