Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564132 - dev-lang/smlnj-110.75 - build killed by grsec (RWX mprotect)
Summary: dev-lang/smlnj-110.75 - build killed by grsec (RWX mprotect)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-25 22:47 UTC by Fedja Beader
Modified: 2018-03-10 23:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/portage/logs/t400/build/dev-lang/smlnj-110.75:20151025-222022.log (smlnj-110.75:20151025-222022.log,151.08 KB, text/plain)
2015-10-25 22:49 UTC, Fedja Beader
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fedja Beader 2015-10-25 22:47:30 UTC
emerge -a smlnj
selected [ebuild  N    ~] dev-lang/smlnj-110.75::gentoo  0 KiB

from dmesg:

grsec: denied RWX mprotect of /tmp/portage/dev-lang/smlnj-110.75/work/bin/.run/run.x86-linux by /tmp/portage/dev-lang/smlnj-110.75/work/bin/.run/run.x86-linux[run.x86-linux:27144] uid/euid:250/250 gid/egid:250/250, parent /tmp/portage/dev-lang/smlnj-110.75/work/config/install.sh[install.sh:25720] uid/euid:250/250 gid/egid:250/250

Bug tagged as minor as I do not need this stuff in the near future.

Reproducible: Always

Steps to Reproduce:
emerge '=dev-lang/smlnj-110.75::gentoo'. Have not tested other versions.
Comment 1 Fedja Beader 2015-10-25 22:49:58 UTC
Created attachment 415492 [details]
/var/portage/logs/t400/build/dev-lang/smlnj-110.75:20151025-222022.log
Comment 2 Fedja Beader 2015-10-25 22:51:39 UTC
Forgot to paste the relevant lines from build log:

make[1]: Leaving directory '/tmp/portage/dev-lang/smlnj-110.75/work/base/runtime/mp'
/tmp/portage/dev-lang/smlnj-110.75/work/config/unpack: Un-GZIP-ing and un-TAR-ing bootfiles archive.
./config/install.sh: CM metadata directory name is ".cm"
/tmp/portage/dev-lang/smlnj-110.75/work/bin/.run/run.x86-linux: error while loading shared libraries: cannot make segment writable for relocation: Permission denied
./config/install.sh !!! Boot code failed, no heap image (sml.x86-linux).
 * ERROR: dev-lang/smlnj-110.75::gentoo failed (compile phase):
 *   compilation failed
Comment 3 Fedja Beader 2016-10-02 22:49:54 UTC
Apparently someone had fixed it in the mean time:

[ebuild  N    ~] dev-lang/smlnj-110.75::gentoo  11,009 KiB

...

>>> dev-lang/smlnj-110.75 merged.

...


However:
...
 * Final size of build directory: 41600 KiB
 * Final size of installed tree: 35356 KiB

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see:
 * 
 *    https://wiki.gentoo.org/wiki/Hardened/HOWTO_locate_and_fix_textrels
 * 
 *  Please include the following list of files in your report:
 * TEXTREL usr/bin/.run/run.x86-linux.so
 * TEXTREL usr/bin/.run/run.x86-linux


 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some
 *  architectures/operating systems.  A bug should be filed at
 *  http://bugs.gentoo.org/ to make sure the issue is fixed.
 *  For more information, see:
 *
 *    https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
 *
 *  Please include the following list of files in your report:
 *  Note: Bugs should be filed for the respective maintainers
 *  of the package in question and not hardened@g.o.
 * !WX --- --- usr/bin/.run/run.x86-linux.a:prim.o
 * RWX --- --- usr/bin/.run/run.x86-linux.so
 * RWX --- --- usr/bin/.run/run.x86-linux

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
Comment 4 Larry the Git Cow gentoo-dev 2018-03-10 23:31:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b740f3f14324d405b1dddf4335e168e1ea2eee21

commit b740f3f14324d405b1dddf4335e168e1ea2eee21
Author:     Mark Wright <gienah@gentoo.org>
AuthorDate: 2018-03-10 23:29:58 +0000
Commit:     Mark Wright <gienah@gentoo.org>
CommitDate: 2018-03-10 23:30:52 +0000

    dev-lang/smlnj: Bump to 110.82, fix install dirs, build on pax kernels.
    
    Bump to 110.82, fixes 487064 , thanks to Keshav Kini and OGINO Masanori for
    reporting.
    
    Install to the smlnj subdirectory underneath the 32 bit lib directory if it
    exists, or the 64 bit lib directory otherwise, and create symlinks in /usr/bin
    to point to the executables.  Fixes 248162, thanks to flameeyes for reporting,
    xmv and hkbst for helping.
    
    Fix build on pax kernels, fixes 564132, thanks to Fedja Beader for reporting.
    
    Closes: https://bugs.gentoo.org/487064
    Closes: https://bugs.gentoo.org/248162
    Closes: https://bugs.gentoo.org/564132
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-lang/smlnj/Manifest                        |  24 ++++
 dev-lang/smlnj/files/smlnj-110.82-pax-p1.patch | 116 +++++++++++++++++
 dev-lang/smlnj/files/smlnj-110.82-pax-p2.patch | 132 ++++++++++++++++++++
 dev-lang/smlnj/files/smlnj-110.82-pax-p3.patch | 137 ++++++++++++++++++++
 dev-lang/smlnj/metadata.xml                    |   4 +
 dev-lang/smlnj/smlnj-110.82.ebuild             | 166 +++++++++++++++++++++++++
 6 files changed, 579 insertions(+)