Page MenuHomeFreeBSD

i386: Don't use static DPCPU and VNET defines in i386 modules
ClosedPublic

Authored by dchagin on Jul 26 2023, 10:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 8:04 PM
Unknown Object (File)
Mon, Jun 24, 7:23 PM
Unknown Object (File)
Jan 28 2024, 5:50 PM
Unknown Object (File)
Dec 20 2023, 8:14 AM
Unknown Object (File)
Dec 12 2023, 6:52 AM
Unknown Object (File)
Aug 23 2023, 5:51 PM
Unknown Object (File)
Aug 15 2023, 11:58 PM
Unknown Object (File)
Aug 15 2023, 9:33 PM

Details

Summary

As of c84617e8 a similar to 4802a2cb and b6ea4c5a fix should be
applied to i386 too.

This should fix CI

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dchagin added reviewers: emaste, jhb.

Hmm, does this mean vnet is now subtly broken on i386 as well now?

I mean more in the way that it's very broken on arm64 because VIMAGE/DPCPU depend on some rather dubious behavior in the kernel linker.

I think before -fPIC was added you'd end up with text relocations that would mean it could work, whereas after -fPIC was added it started to do the PC-relative thing, or something like that.

But the list of architectures that can't use static should be the list of architectures that use pre-linked kernel modules, i.e. everything except amd64, so at this point probably it should be flipped to say that.

I think before -fPIC was added you'd end up with text relocations that would mean it could work, whereas after -fPIC was added it started to do the PC-relative thing, or something like that.

I think so, that's why I mention -fPIC commit. Prior to -fPIC commit many modules was broken https://bugs.llvm.org/show_bug.cgi?id=51736

But the list of architectures that can't use static should be the list of architectures that use pre-linked kernel modules, i.e. everything except amd64, so at this point probably it should be flipped to say that.

I agree

This revision was not accepted when it landed; it landed in state Needs Review.Jul 28 2023, 8:56 AM
This revision was automatically updated to reflect the committed changes.