[Bug 294369] powerpc64: panic in zfs_write() during buildworld

[email protected] Mon, 27 Jul 2026 16:56:23 +0000
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D294369

--- Comment #5 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3Db68f2fe1932cbc9809245e2c5a2db2bc0=
944cc5d

commit b68f2fe1932cbc9809245e2c5a2db2bc0944cc5d
Author:     Jessica Clarke <[email protected]>
AuthorDate: 2026-07-27 16:54:04 +0000
Commit:     Jessica Clarke <[email protected]>
CommitDate: 2026-07-27 16:54:04 +0000

    Merge commit 26bf39cdba0b from llvm-project (by Jessica Clarke):

      [ELF][PowerPC] Don't assume TOC pointer is valid in IPLT entries
(#207555)

      Unlike normal PLT entries, IPLT entries can be called indirectly even
      when in PIEs/DSOs, and so there's no guarantee on what's in the TOC
      pointer register at that time. Therefore we must emit variants of the
      existing code that work without it, whether r12-relative (playing the
      same role as MIPS's $25) in the same number of instructions, or first
      retrieving PC in an i386-like manner, being careful not to clobber LR.
      On 32-bit PowerPC even direct calls to IPLT entries face the same iss=
ue,
      since we'd use the TOC base of the resolver, which may not be the same
      as the caller, even within the same object.

      Normal canonical PLTs still look broken on 64-bit PowerPC as they use
      the TOC pointer register too, and similarly on 32-bit PowerPC for PIE=
s.
      We should probably treat these cases the same as PIE on i386 (except
      including PDEs for 64-bit PowerPC), where it's an error due to the use
      of %ebx in PLT entries.

    Bump LLD_FREEBSD_VERSION for this fix as otherwise an existing system
    linker will be deemed new enough to use and produce broken kernels for
    TARGET=3Dpowerpc (regardless of TARGET_ARCH/MACHINE/MACHINE_ARCH) build=
s.

    PR:             294369
    MFC after:      1 week

 contrib/llvm-project/lld/ELF/Arch/PPC.cpp   | 13 +++---
 contrib/llvm-project/lld/ELF/Arch/PPC64.cpp |  5 ++-
 contrib/llvm-project/lld/ELF/Thunks.cpp     | 69 +++++++++++++++++++++----=
----
 contrib/llvm-project/lld/ELF/Thunks.h       |  9 ++--
 lib/clang/include/lld/Common/Version.inc    |  2 +-
 5 files changed, 67 insertions(+), 31 deletions(-)

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