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

[email protected]
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294369

--- Comment #6 from [email protected] ---
A commit in branch stable/15 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=310a5a993ac8ffba2edcdb8152688620c2f5e56f

commit 310a5a993ac8ffba2edcdb8152688620c2f5e56f
Author:     Jessica Clarke <[email protected]>
AuthorDate: 2026-07-27 16:54:04 +0000
Commit:     Jessica Clarke <[email protected]>
CommitDate: 2026-08-06 18:02:32 +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 issue,
      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 PIEs.
      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=powerpc (regardless of TARGET_ARCH/MACHINE/MACHINE_ARCH) builds.

    PR:             294369
    MFC after:      1 week

    (cherry picked from commit b68f2fe1932cbc9809245e2c5a2db2bc0944cc5d)

 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(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.