Bug 1019452

Summary: [ARM] Backport pointer mangling support from upstream.
Product: [Fedora] Fedora Reporter: Carlos O'Donell <codonell>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: blc, codonell, fweimer, jakub, law, pbrobinson, pfrankli, schwab, spoyarek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.18-13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-03 15:01:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos O'Donell 2013-10-15 18:14:53 UTC
Pointer mangling on 32-bit ARM is not currently supported in f20.

In order to strive towards security feature parity with x86 we should backport support for pointer mangling which was added in upstream by this commit:

---
commit b7f2d27dbd85f6a0966dc389ad4f8205085b7ae8
Author: Will Newton <will.newton>
Date:   Wed Aug 7 13:55:30 2013 +0100

    ARM: Add pointer encryption support.
    
    Add support for pointer encryption in glibc internal structures in C
    and assembler code. Pointer encryption is a glibc security feature
    described here:
    
    https://sourceware.org/glibc/wiki/PointerEncryption
    
    The ARM implementation uses global variables instead of thread pointer
    relative accesses to get the value of the pointer encryption guard
    because accessing the thread pointer can be very expensive on older
    ARM cores.
    
    ports/ChangeLog.arm:
    
    2013-10-03  Will Newton  <will.newton>
    
        * sysdeps/arm/__longjmp.S (__longjmp): Demangle fp, sp
        and lr when restoring register values.
        * sysdeps/arm/include/bits/setjmp.h (JMP_BUF_REGLIST): Remove
        sp and lr from list and replace fp with a4.
        * sysdeps/arm/jmpbuf-unwind.h (_jmpbuf_sp): New function.
        (_JMPBUF_UNWINDS_ADJ): Call _jmpbuf_sp.
        * sysdeps/arm/setjmp.S (__sigsetjmp): Mangle fp, sp and lr
        before storing register values.
        * sysdeps/arm/sysdep.h (LDST_GLOBAL): New macro.
        * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE): New macro.
        (PTR_DEMANGLE): Likewise. (PTR_MANGLE2): Likewise.
        (PTR_DEMANGLE2): Likewise.
---

The patch adds no new external symbols and is completely internal to glibc, therefore there should be little risk that this breaks anything.

Comment 1 Carlos O'Donell 2013-10-15 18:15:21 UTC
Note: This does not consider AArch64 support only 32-bit ARM support.

Comment 2 Siddhesh Poyarekar 2014-02-06 11:14:06 UTC
Build in progress:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6499662

Comment 3 Peter Robinson 2014-07-31 09:10:23 UTC
Carlos do we have this in F-20+ now?

Comment 4 Carlos O'Donell 2014-07-31 23:58:21 UTC
(In reply to Peter Robinson from comment #3)
> Carlos do we have this in F-20+ now?

Yes. It is in 2.18-13, but I don't see that built in the ARM koji instance.

Comment 5 Carlos O'Donell 2014-08-01 00:01:51 UTC
(In reply to Carlos O'Donell from comment #4)
> (In reply to Peter Robinson from comment #3)
> > Carlos do we have this in F-20+ now?
> 
> Yes. It is in 2.18-13, but I don't see that built in the ARM koji instance.

Looks like -13 didn't get pushed through bodhi.

We often don't push all releases through bodhi since we like to batch up changes.

Do you need it pushed out to F20?

Comment 6 Peter Robinson 2014-08-01 07:15:41 UTC
> Looks like -13 didn't get pushed through bodhi.
> 
> We often don't push all releases through bodhi since we like to batch up
> changes.
> 
> Do you need it pushed out to F20?

Yes, otherwise the bug isn't fixed is it :)

Comment 7 Peter Robinson 2014-08-01 07:16:47 UTC
(In reply to Carlos O'Donell from comment #4)
> (In reply to Peter Robinson from comment #3)
> > Carlos do we have this in F-20+ now?
> 
> Yes. It is in 2.18-13, but I don't see that built in the ARM koji instance.

Because ARM went mainline for F-20 so it's in the main koji instance alongside x86

http://koji.fedoraproject.org/koji/buildinfo?buildID=496531

Comment 8 Fedora End Of Life 2015-05-29 09:34:46 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Carlos O'Donell 2015-06-03 05:01:17 UTC
For the record 2.18-16 was pushed and this is resolved, but bodhi update didn't include this bug in the errata.