Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2022 20:08:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 264094] VNET and DPCPU defined in modules panic on use on arm64 after LLVM 14 import due to new linker relaxation
Message-ID:  <bug-264094-7501-VV4bXwkpYd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-264094-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-264094-7501@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=3D264094

--- Comment #21 from Mark Johnston <markj@FreeBSD.org> ---
(In reply to Jessica Clarke from comment #20)
Oh, right.  So kmod_syms.awk is defeating the hack in VNET_DEFINE_STATIC.  =
That
can be bandaged easily enough.

I tried implementing your suggestion of adding an explicit offset with each
VNET definition.  It's a bit painful due to consumers doing things like:

VNET_DEFINE(LIST_HEAD(, foo), n) =3D LIST_HEAD_INITIALIZER();

I don't think it's possible to implement VNET_DEFINE this way without either
outlawing static initializers (or making them an argument to the macro itse=
lf
instead of using assignment), or outlawing anonymous types, i.e., the above
would have to be:

LIST_HEAD(foo_list, foo);
VNET_DEFINE(struct foo_list, n) =3D LIST_HEAD_INITIALIZER();

I would go with the second option, but it does require a bunch of consumers=
 to
be patched.

I haven't yet compared the generated code with what we had before.

--=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-264094-7501-VV4bXwkpYd>