Gentoo Archives: gentoo-hardened

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