Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344267 - www-client/opera needs pax-mark
Summary: www-client/opera needs pax-mark
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 14:45 UTC by Paulo Matias
Modified: 2010-12-21 16:14 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Matias 2010-11-05 14:45:56 UTC
On Gentoo Hardened with PaX, www-client/opera crashes because the ebuild doesn't mark it with the "disable MPROTECT" flag.

This flag needs to be disabled because Opera uses a JIT for JavaScript, so it needs to mark some data regions to be executable.

To fix it, pax-utils needs to be inherited in the ebuild:

inherit eutils multilib pax-utils

And pax-mark needs to be used at the end of src_install, as follows:

pax-mark m "${D}usr/lib/opera/opera"
pax-mark m "${D}usr/lib/opera/operaplugincleaner"
pax-mark m "${D}usr/lib/opera/operapluginwrapper"


Reproducible: Always

Steps to Reproduce:
1.Install www-client/opera on Gentoo Hardened with PaX.
2.Open opera.
3.Try to navigate to any website.

Actual Results:  
Opera crashes.

Expected Results:  
Opera should load the website.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-21 15:45:48 UTC
I'm trying to get this into a new opera ebuild, but I wonder what happens if `pax-mark *' is run on a non-hardened system. Looking at the code in pax-utils.eclass, it looks like on a non-hardened system it would end up running either scanelf uselessly, or failing.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-21 15:47:48 UTC
Or should I assume that on non-hardened, this is always true?:

pax-utils.eclass, line 135:
      [[ ${PAX_MARKINGS} != "none" ]]
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-21 15:57:20 UTC
OK, tested on non-hardened, it seems it doesn't do anything disruptive. That's into CVS revision 1.2 of =www-client/opera-11.00.1156. Thank you for reporting. (Please reopen this bug report if it doesn't work on hardened as intended.)
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-21 16:14:12 UTC
It would appear that <opera:config#Extensions|EcmaScriptJIT> allows you to disable the JIT compiler - maybe that's of interest to hardened users.