Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#10208 closed bug (fixed)

libffi issues executable stacks on i386

Reported by: slyfox Owned by: simonmar
Priority: normal Milestone: 7.10.2
Component: Runtime System Version: 7.10.1
Keywords: libffi Cc: simonmar
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D764
Wiki Page:

Description

Noticed today when built binaries for i386-gentoo-linux. Latest build phase checks for executable stacks in final result.

     * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so.6.0.2
     * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so
     * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so.6
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_p.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_l.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_debug.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_debug.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_l.a:win32.o
     * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_p.a:win32.o

Issue first found and fixed in gentoo:

http://bugs.gentoo.org/511634

and then sent upstream:

http://sourceware.org/ml/libffi-discuss/2014/msg00058.html

Change History (4)

comment:1 Changed 3 years ago by thoughtpolice

Differential Rev(s): D764Phab:D764
Status: newpatch

comment:2 Changed 3 years ago by Sergei Trofimovich <siarheit@…>

In 47f821a1a24553dc29b9581b1a259a9b1394c955/ghc:

libffi: backport noexecstack fix for x86/win32.S

Got detected by gentoo's QA preinstall hook:
 * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so.6.0.2
 * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so
 * RWX --- --- usr/lib/ghc-7.10.1/rts/libffi.so.6
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_p.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_l.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_debug.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_debug.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_l.a:win32.o
 * !WX --- --- usr/lib/ghc-7.10.1/rts/libCffi_thr_p.a:win32.o

Signed-off-by: Sergei Trofimovich <siarheit@google.com>

Test Plan: built ghc-7.10.1 binary and checked stacks as NX

Reviewers: rwbarton, hvr, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D764

GHC Trac Issues: #10208

comment:3 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10 (via 56ecec4986d21468e7146017831a110bd3a4a86c).

comment:4 Changed 3 years ago by hvr

Keywords: libffi added
Note: See TracTickets for help on using tickets.