Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367111 - Please add a use flag to net-libs/xulrunner allowing JIT to be disabled on hardened systems
Summary: Please add a use flag to net-libs/xulrunner allowing JIT to be disabled on ha...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 16:48 UTC by Radoslaw Madej (radegand)
Modified: 2011-07-08 16:16 UTC (History)
4 users (show)

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


Attachments
proposed patch (jit.patch,687 bytes, patch)
2011-05-13 16:50 UTC, Radoslaw Madej (radegand)
Details | Diff
Ebuild that builds xulrunner without JIT (xulrunner-2.0.1.ebuild,5.68 KB, text/plain)
2011-05-13 16:52 UTC, Radoslaw Madej (radegand)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radoslaw Madej (radegand) 2011-05-13 16:48:24 UTC
Similar to #338245, could we please have the 'jit' flag for xulrunner for the same reasons as in the original bug? Disabling JIT on xulrunner allows firefox to run with MPROTECT enabled on grsecurity kernels, which greatly increases the security of the browser itself :) While the drawback is a slower JS, it'd be nice for end users to decide between the security versus performance tradeoff. 

Please note that in order for the MPROTECT to work, user has to disable all remaining JIT options using the about:config firefox functionality.

To disable JIT in xulrunner a small patch (attached) and two additional 'configure' options are required:
  mozconfig_annotate '' --disable-jit                                                                                                                                             
  mozconfig_annotate '' --disable-methodjit

Thanks to zakalwe on #grsecurity for help and patch :)

Thanks,
radegand

Reproducible: Always
Comment 1 Radoslaw Madej (radegand) 2011-05-13 16:50:46 UTC
Created attachment 273103 [details, diff]
proposed patch
Comment 2 Radoslaw Madej (radegand) 2011-05-13 16:52:21 UTC
Created attachment 273105 [details]
Ebuild that builds xulrunner without JIT

...Assuming that the patch above is in /etc/portage/patches/net-libs/xulrunner :)
Comment 3 Jory A. Pratt gentoo-dev 2011-05-13 20:54:02 UTC
We need to stay as close to upstream as possible. If we disable jit we will break more addons, this will leave many issues reported that would otherwise not be seen.
Comment 4 PaX Team 2011-05-14 17:37:04 UTC
(In reply to comment #3)
> We need to stay as close to upstream as possible.

who's 'we'? this change is of interest to all hardened users.

> If we disable jit we will break more addons,

what addons *require* JIT compilation to be used (vs. the interpreter)?

> this will leave many issues reported that would otherwise not be seen.

what issues? and what's wrong with reporting issues? what's wrong with fixing them?
Comment 5 solar (RETIRED) gentoo-dev 2011-05-25 01:22:56 UTC
Please don't make hardened users have to jump hoops to have a working system by default with things we can simply control on a per profile basis. 

Perhaps the patch should work it's way upstream first and then we add a simple USE= flag for the people who don't want this yarr jit by default.
Comment 6 Radoslaw Madej (radegand) 2011-06-25 19:53:17 UTC
(In reply to comment #5)
> Please don't make hardened users have to jump hoops to have a working system by
> default with things we can simply control on a per profile basis. 
> 
> Perhaps the patch should work it's way upstream first and then we add a simple
> USE= flag for the people who don't want this yarr jit by default.

Makes sense...I was about to send the patch upstream but Firefox 5 came out in the meantime and it turns out to be that on FF5 you can disable jit simply at configure and no patch is actually needed :) So I think the point remains valid somehow... ;) please see bug 373029 for details - enabling jit on hardened-sources kernel prevents Firefox 5 from compiling.

Cheers,
radegand
Comment 7 Nirbheek Chauhan (RETIRED) gentoo-dev 2011-07-06 05:38:23 UTC
I've removed the "hardened" USE-flag, and added a "+methodjit" USE-flag instead. firefox-bin and plugin-container are also 'pax-mark m' unconditionally again.

Hint for those who want to disable methodjit: build with USE=pgo, it'll take 2x the time, but will lead to less slowdown.

Closing as FIXED.
Comment 8 Jaak Ristioja 2011-07-06 09:55:09 UTC
Can the same fix please be applied to www-client/icecat which still seems to suffer from this bug?
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-08 16:16:36 UTC
(In reply to comment #8)
> Can the same fix please be applied to www-client/icecat which still seems to
> suffer from this bug?

Done with icecat-5.0-r1