From nobody Sun Dec 17 12:21:50 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4StMXC5gwfz54Xp1 for ; Sun, 17 Dec 2023 12:22:03 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4StMXC4ypxz4Gdp for ; Sun, 17 Dec 2023 12:22:03 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702815723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+ifFAnkisCJtTCcoYnGp1oGfpUGZ4XksWEJ2Wvz/itw=; b=xfaQAUSaSLDjrPZfwwoWbcFbPrS1xNZO6NaNOdtu/BONoRdtugrl+HgCPn+gSauZBcPYG6 IUuZ6sJ0oeCJUeYEmKd/d+0bZxwZd4XccYDN/VwmOrperjsJFZfrSNfP4TcG/CxwVLpk9a e3bHowPTOFjxxSBCOVvix3DIec4KdgkBldyCKvtzphkj5as+DQy1ap9Vk6AaLXtoGN3bV8 Snlx+KR4yrTkqwnkGqGsA0XihjHgKFS6gp5Jkr/3ooCnPe/2PK5gtnQIGSfb0gh2Z9VzP4 YxQoDgXf1Di0BK/GL/579+mOq8qG3Q2t0Ba+hHJBRQH+e5O+yM3Vutq1Kos4PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702815723; a=rsa-sha256; cv=none; b=lbyIVogaVpQKkKB2NYqwOVedkqEXBP0STqWOlCFDIGGgY5s9LKxtsHOUpZXyo/RftV64RD sFnoXc6CDqhghli3jFDYOqPDSfXnrUFAFte77av0ik6c0QneT1gb2NA41EmQlO4zIylfqW KT/tAXDJG0/bSkAAIlCMCikHvjJbExeKpAf0ObQKSI8ZIgnKtxFxbPv+sTr6b2A2ZMJsdS kLL9m79ApuPM9Pti4lK4sJjpMufIvpGd+chTfZCFNHHjXv2z/b1qGSzQuFRMmxWvSd+IWX IcD768A7ZRHHpd4pdvBr4uxUd067iutjbOYj9TSnAKee7UpzwFkhhmKKpY9Qbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702815723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+ifFAnkisCJtTCcoYnGp1oGfpUGZ4XksWEJ2Wvz/itw=; b=bzeC0Nx2osM3trxSFZOB0GJ4xQ9xh0GVkPxjiT+pv0pFuIlgApHoRHpoALFekW59wQQD5X Cu9Q23pRxrTo5jCEu628BT8kt82ZuZn30o0GHVqdNws3ZSxmXBrej4HChe+lGO9GzrsSoy N3/uXdjZAGElQzsLAyQ+hNJunolZpz93N5ajlTtIqWU6MFC+m2LUhyB5wP81OoFP7Hrj/T 9rU4tr+Xn7CRVxInbKat8Fy5yVrbm2eojxFB9nNJDpshorjQ5PFBQjZ7fVP1qRHpVUbCl+ r8mejOTjgTq25d7ZwNQ6oc2FbkvmCemh4WuoqIN4YwhMPLhL88YNMH+B7yB1aw== Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4StMXC1XhJz19LG for ; Sun, 17 Dec 2023 12:22:03 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-4260ba19a57so24147131cf.3 for ; Sun, 17 Dec 2023 04:22:03 -0800 (PST) X-Gm-Message-State: AOJu0Yw1hloOurFOhBlBRCcbrR8GYVq6lUtiq1J3eVVOKxi8V//vghvJ MAyN6kQh1l3Htz3C9IYHa8j9gLSUfteeodEDCZ4= X-Google-Smtp-Source: AGHT+IEH+go93L/lUOQEjPgfYykOEvxGr8h1OopKeuU7E3B2Qq9WaPDymCpQqmeYgihtw+M8bp/BGQInA6mkvJLXPxw= X-Received: by 2002:a05:622a:1b91:b0:425:8635:785b with SMTP id bp17-20020a05622a1b9100b004258635785bmr17644954qtb.71.1702815722148; Sun, 17 Dec 2023 04:22:02 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <9518dc38-e44b-42ae-bf87-6039ac278ac8@FreeBSD.org> <46c52d37-36ec-45fc-8098-1029996c717c@FreeBSD.org> <27c55e4e-21d2-44f7-9436-95fa1e5b4722@FreeBSD.org> <7daaaade-955d-4678-bec4-a34a196b27b7@FreeBSD.org> In-Reply-To: <7daaaade-955d-4678-bec4-a34a196b27b7@FreeBSD.org> From: Nuno Teixeira Date: Sun, 17 Dec 2023 12:21:50 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: firefox broken on arm64 To: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003c98be060cb3ae72" --0000000000003c98be060cb3ae72 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Jesper, I've applied your reversed patch and used makepatch into a ready to use patch: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D247095 thanks Jesper Schmitz Mouridsen escreveu no dia s=C3=A1bado, 16/12/2023 =C3=A0(s) 22:08: > > > On 10.12.2023 14.08, Jesper Schmitz Mouridsen wrote: > > > > > > On 03.12.2023 11.59, Jesper Schmitz Mouridsen wrote: > >> > >> > >> On 03.12.2023 09.38, void wrote: > >>> On Sun, Dec 03, 2023 at 08:34:21AM +0100, Jesper Schmitz Mouridsen > >>> wrote: > >>>> > >>>> Just build firefox-esr-115.5.0_1,1 and firefox-116.0.3_1,2 the > >>>> first runs with aslr disabled, the latter signals 4. > >>>> > >>>> Any suggestions on what is going on are appreciated. > >>> > >>> What's the uname -aKU ? > >> > >> FreeBSD generic 14.0-RELEASE FreeBSD 14.0-RELEASE #0 > >> releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 09:12:14 UTC 2023 > >> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERI= C > arm64 1400097 1400097 > >> > >> did you build from ports or poudriere? > >> From ports. > >> > >> If the > >>> latter, what's the /etc/make.conf contain? > >>> > >>> Please post sysctl -a | grep aslr > >>> > >> > >> kern.elf32.aslr.shared_page: 0 > >> kern.elf32.aslr.stack: 1 > >> kern.elf32.aslr.honor_sbrk: 0 > >> kern.elf32.aslr.pie_enable: 0 > >> kern.elf32.aslr.enable: 0 > >> kern.elf64.aslr.shared_page: 1 > >> kern.elf64.aslr.stack: 1 > >> kern.elf64.aslr.honor_sbrk: 0 > >> kern.elf64.aslr.pie_enable: 1 > >> kern.elf64.aslr.enable: 1 > >> vm.aslr_restarts: 256 > >> > >> I did the esr build to test the build setup, since also the pkg in the > >> official pkg repo behaves the same i.e the one before 115.5 since > >> 115.5 did not hit the pkg repo yet, which works without aslr (set by > >> proccontrol) So unless 116 introduces something which requires sysctl > >> changes for the building tool chain while building my test should be > >> valid. > >> > >> Thanks > >> > >> /jsm > >> > >> > > Hi > > Just FYI > > I have managed to cross-compile firefox115-esr on amd64 to aaarhc64 so > > that takes me ~20 min compute time to compile as opposed to 5-7 hours o= n > > my arm boards... I think it broke somewhere between 115 and 116, but no= w > > bisecting is doable to the extend the port patches allows. Can someone > > btw tell me hove the libwebrtc patches are generated..? > > > I build and bisected with --disable-webrtc so I did not need the patches > for that.. > It breaks here: > changeset: 743155:5c5cf716aa0b > user: Jan de Mooij > date: Wed Jun 07 16:34:51 2023 +0000 > summary: Bug 1835876 part 2 - Disable code write protection in > content processes. r=3Dnbp > > [root@freebsd2 /tmp3/bisect/mozilla-unified]# hg log -r 743154 > changeset: 743154:028f981600d7 > user: Jan de Mooij > date: Wed Jun 07 16:34:51 2023 +0000 > summary: Bug 1835876 part 1 - Remove unused > ProtectionSetting::Protected. r=3Dnbp > > Related to w^x.. I can only make it work by reverting the whole of the > two above commits... > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271081#c7) Still > disabling aslr is required > /Jsm > > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000003c98be060cb3ae72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Jesper,

I've appli= ed your reversed patch and used makepatch into a ready to use patch:

<= div dir=3D"ltr" class=3D"gmail_attr">Jesper Schmitz Mouridsen <jsm@freebsd.org> escreveu no dia s=C3=A1= bado, 16/12/2023 =C3=A0(s) 22:08:


On 10.12.2023 14.08, Jesper Schmitz Mouridsen wrote:
>
>
> On 03.12.2023 11.59, Jesper Schmitz Mouridsen wrote:
>>
>>
>> On 03.12.2023 09.38, void wrote:
>>> On Sun, Dec 03, 2023 at 08:34:21AM +0100, Jesper Schmitz Mouri= dsen
>>> wrote:
>>>>
>>>> Just build firefox-esr-115.5.0_1,1=C2=A0 and firefox-116.0= .3_1,2 the
>>>> first runs with aslr disabled, the latter signals 4.
>>>>
>>>> Any suggestions on what is going on are appreciated.
>>>
>>> What's the uname -aKU ?
>>
>> FreeBSD generic 14.0-RELEASE FreeBSD 14.0-RELEASE #0
>> releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 09:12:14 UTC 2023 >> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GE= NERIC arm64 1400097 1400097
>>
>> =C2=A0=C2=A0did you build from ports or poudriere?
>> =C2=A0From ports.
>>
>> If the
>>> latter, what's the /etc/make.conf contain?
>>>
>>> Please post sysctl -a | grep aslr
>>>
>>
>> kern.elf32.aslr.shared_page: 0
>> kern.elf32.aslr.stack: 1
>> kern.elf32.aslr.honor_sbrk: 0
>> kern.elf32.aslr.pie_enable: 0
>> kern.elf32.aslr.enable: 0
>> kern.elf64.aslr.shared_page: 1
>> kern.elf64.aslr.stack: 1
>> kern.elf64.aslr.honor_sbrk: 0
>> kern.elf64.aslr.pie_enable: 1
>> kern.elf64.aslr.enable: 1
>> vm.aslr_restarts: 256
>>
>> I did the esr build to test the build setup, since also the pkg in= the
>> official pkg repo behaves the same i.e the one before 115.5 since =
>> 115.5 did not hit the pkg repo yet, which works without aslr (set = by
>> proccontrol) So unless 116 introduces something which requires sys= ctl
>> changes for the building tool chain while building my test should = be
>> valid.
>>
>> Thanks
>>
>> /jsm
>>
>>
> Hi
> Just FYI
> I have managed to cross-compile firefox115-esr on amd64 to aaarhc64 so=
> that takes me ~20 min compute time to compile as opposed to 5-7 hours = on
> my arm boards... I think it broke somewhere between 115 and 116, but n= ow
> bisecting is doable to the extend the port patches allows. Can someone=
> btw tell me hove the libwebrtc patches are generated..?
>
I build and bisected with --disable-webrtc so I did not need the patches for that..
It breaks here:
changeset:=C2=A0 =C2=A0743155:5c5cf716aa0b
user:=C2=A0 =C2=A0 =C2=A0 =C2=A0 Jan de Mooij <jdemooij@mozilla.com>
date:=C2=A0 =C2=A0 =C2=A0 =C2=A0 Wed Jun 07 16:34:51 2023 +0000
summary:=C2=A0 =C2=A0 =C2=A0Bug 1835876 part 2 - Disable code write protect= ion in
content processes. r=3Dnbp

[root@freebsd2 /tmp3/bisect/mozilla-unified]# hg log -r 743154
changeset:=C2=A0 =C2=A0743154:028f981600d7
user:=C2=A0 =C2=A0 =C2=A0 =C2=A0 Jan de Mooij <jdemooij@mozilla.com>
date:=C2=A0 =C2=A0 =C2=A0 =C2=A0 Wed Jun 07 16:34:51 2023 +0000
summary:=C2=A0 =C2=A0 =C2=A0Bug 1835876 part 1 - Remove unused
ProtectionSetting::Protected. r=3Dnbp

Related to w^x.. I can only make it work by reverting the whole of the
two above commits...
(https://bugs.freebsd.org/bugzilla/show= _bug.cgi?id=3D271081#c7) Still
disabling aslr is required
/Jsm



--
Nuno Teixeira
FreeBSD Committ= er (ports)
--0000000000003c98be060cb3ae72--