Gentoo Archives: gentoo-hardened

From: Radek Madej <radegand@××.pl>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Firefox won't compile on hardened profile
Date: Wed, 15 Feb 2012 20:39:01
Message-Id: 1429555.pngWVYmgQx@quad
In Reply to: Re: [gentoo-hardened] Firefox won't compile on hardened profile by Hinnerk van Bruinehsen
1 Hi,
2
3 On Wednesday 15 February 2012 18:10:51 Hinnerk van Bruinehsen wrote:
4 > -----BEGIN PGP SIGNED MESSAGE-----
5 > Hash: SHA1
6 >
7 > On 15.02.2012 17:39, Grant wrote:
8 > >
9 > > I don't get it then. Does anyone know why I can't compile Firefox
10 > > as described in the link above? This sums it up:
11 > >
12 > > "firefox-9.0 ebuild stalls at the install phase while xpcshell
13 > > command tops CPU usage for hours."
14 > >
15 > > Although xpcshell doesn't use any CPU for me. It just sits there
16 > > and the install phase doesn't proceed.
17 > >
18 > > - Grant
19 >
20 > I can compile Icecat with a customized ebuild. since it's basically
21 > the same as Firefox, maybe that helps. Basically it disables jit.
22 >
23
24 You can't compile it on a grsec kernel because of this bug: :)
25 https://bugs.gentoo.org/show_bug.cgi?id=396275
26
27 It's odd that it hangs at xpcshell for you as it's already paxmarked in the
28 ebuild...
29
30 Anyway, I'd suggest:
31
32 1) keyword firefox so you can get the latest one, which currently is the
33 10.0.1. I'm not sure if the security patches between 9.0.1 and 10.0.1 have
34 been backported. AFAIK, Firefox-10.0.1 from the ebuild in portage tree will
35 compile just fine on hardened.
36
37 2) As suggested, disabling JIT will do the trick and it seems like recent
38 versions of Firefox can actually have it disabled properly. So the ebuild for
39 icecat/firefox will work for you, you just need this in src_configure() :
40
41 if use pax_kernel; then
42 mozconfig_annotate '' --disable-methodjit
43 mozconfig_annotate '' --disable-tracejit
44 fi
45
46 3) the other benefit of disabling jit completely is that you can now disable
47 the paxmarking turning MPROTECT off and benefit from properfly enforced W^X pages
48 :) Unless you want to use FF for flash or java that is... ;)
49
50 Cheers,
51 Radek

Replies