[Bug libc/34530] Regression in POWER fortified longjmp with pointer guard rotation

fweimer at redhat dot com via Glibc-bugs <[email protected]>
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34530

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |glibc_2.44
   Target Milestone|---                         |2.45
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
2.45 fixed so far. I will backport to 2.44 next week.

commit 24d188a2a149b9933e17240e454f917e065cdf06
Author: Florian Weimer <[email protected]>
Date:   Tue Aug 18 21:48:34 2026 +0200

    powerpc: Fix non-atomic stack pointer update in fortified longjmp (bug
34530)

    After commit 78f1f0e39cd41d28ae771eb3498bc33780c85cfd ("Consolidate
    the C pointer guard and align the assembly implementations"),
    PTR_DEMANGLE3 on POWER no longer atomically updates the destination
    register. The fortified longjmp relies on atomic update of the
    stack pointer (r1) in sysdeps/powerpc/powerpc64/__longjmp-common.S
    and parallel files:

    #ifdef PTR_DEMANGLE
    # ifdef CHECK_SP
            PTR_DEMANGLE3 (r22, r22, r25)
    # else
            PTR_DEMANGLE3 (r1, r22, r25)
    # endif
    #endif

    Fix this by using PTR_DEMANGLE instead of PTR_DEMANGLE3.  Remove
    PTR_MANGLE3 and PTR_DEMANGLE3 as unused.

    An alternate fix would store the pointer guard cookie rotated,
    but this would go against the unification in the commit that
    introduced the regression.

    Reviewed-by: Adhemerval Zanella  <[email protected]>

-- 
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.