From nobody Mon Jun 05 11:00:18 2023 X-Original-To: dev-commits-ports-main@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 4QZVy84J2Zz4Zbkm; Mon, 5 Jun 2023 11:00:32 +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 4QZVy83rWqz4ZN8; Mon, 5 Jun 2023 11:00:32 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685962832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JZ5iw8Hz3mMKxmyVM6S1ASJWlyR2OsAd2p4/wT6GOU8=; b=RiOU/Qa446eaqhx2r7L6LN9XsuYF5QkeOZET+WxNvuJKuzd6PV6OPj5mkAIp6k11FurP8X jcD9uFuzOgafAb+/V00WFvyRm/z05ruhXzWByMkfE+zv1ZYyZtXMCKq/X5T9LlICW8VMeA 8Gw4LsDY0kDY7JWpx4eXb9w/w+0YNuV64jMRp7g1yoHGR7b9Fywq1t3bWmARUePh04Y9LT TTh1QWsKx1Xbx+qkZ4H10NpLP+iW52lStZWsjXFsJE+Hkr6ekrbKUjqmh2KBsmfCkZZbcM +s31R4hY7TH/Txt6gGS0TOXFaycDkOr2+CeaAaH3RVrD/HZWqHKCjP0DZ7ytgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685962832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JZ5iw8Hz3mMKxmyVM6S1ASJWlyR2OsAd2p4/wT6GOU8=; b=BuJ/FDvFShv4XbPpRBAyws1dgznqa9dGRlom0qo73VL6B7u0XJsZ65wHvw51vxSFbZlA12 Ms2us7UszQOghfo4WJr4HFLuQNmlpeDjAn8WrFvHKECW3a78zYIqcnH6u9WBGQiG0FKfuE B32mdYGoO+f5HHgxyYFZsSJL31rcoSuWRkvomNUvS7paor1BDyRXTMJiZ0xUg5P7tjdWj2 /jHKN0CD2tBIpiEQJaPm9RRUPpebxlN7de0cd17bBaPd005SZpoVpaLLLFg4GbMjNzj/j0 ogOauoUJnISv0/Idp0GGSAbYNacdkBwfTlFFsndJ8fY/GDJtPNBjeopcGk3MuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685962832; a=rsa-sha256; cv=none; b=vcwaiiSJMSSD3qqpZHFoUA/r3FqlvrMpnwJKqASQaRJPGOe6i4WznzLvcY2rC+0dUUHfRz vvKY5LWHkNldLwF2XvAUAVus1ZysZ8T8RGCgU9t7sjuO+jw6if07029vnfthG0cjq9F4tu 2a7sZSeKDOeMJaBdSAvfEf4foRo3kAgRo7P+YYGf8PU5j2CO9Z78Jb194vMLlIvRH5EsnZ bwP9PdckQKM1+qAwxns/3J+magA9aAIzxuHDzAzMTw2pDVi/F/sJ1XX7zrTzpg3wpJYnxe UM2A8q4Jq689+I0O2rrHNtahy8DBsnNVmBg0bs4Nl0GHFcqLOsHRJ9o3LGqsHA== Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 4QZVy82mY7zFWm; Mon, 5 Jun 2023 11:00:32 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-53f832298acso2565307a12.0; Mon, 05 Jun 2023 04:00:32 -0700 (PDT) X-Gm-Message-State: AC+VfDyVoN06GfyJXioYlVOm+l7ftrw+/x+n0wIl7+pGcs8Rqcv0sfdP P2N+vsp/d1PxCIeLEibpQRCqtBwqtdxiBPIB+eE= X-Google-Smtp-Source: ACHHUZ7Eg2UyobeF+M2D7rsGSMMyBE88nVuTLcF2sYoCWeTZw6K68uJgkjBjgRf42hxUSxHEbjFsDTppAjCXRx3TwlI= X-Received: by 2002:a05:6a20:3d0a:b0:114:7637:3451 with SMTP id y10-20020a056a203d0a00b0011476373451mr4032838pzi.37.1685962831249; Mon, 05 Jun 2023 04:00:31 -0700 (PDT) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202306051020.355AKv8s099426@gitrepo.freebsd.org> In-Reply-To: From: Nuno Teixeira Date: Mon, 5 Jun 2023 12:00:18 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: f05f6dcedb5d - main - comms/gqrx: Turn off ASLR To: Ganael LAPLANCHE Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a94bc005fd5fcf95" X-ThisMailContainsUnwantedMimeParts: N --000000000000a94bc005fd5fcf95 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable (...) Find it: # Change an ELF binary's feature control note # # Feature: elfctl # Usage: USES=3Delfctl # Valid ARGS: none # # Variables # # ELF_FEATURES=3D featurelist:path/to/file1 \ # featurelist:path/to/file1 \ featurelist:path/to/file2 # # The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC}. # Nice! Nuno Teixeira escreveu no dia segunda, 5/06/2023 =C3= =A0(s) 11:49: > Hello Ganael, > > I didn't know that were a way to disabling aslr in a port! This is really > nice. > > I'm having a lot of segfaults and tab crashing on firefox @aarch64 and > mikael@ sugested turning it off to see if it fixes. > I will test first with sysctl aslr off and if it works I will test port > option. > > So syntax is: > > USES+=3D elfctl > ELF_FEATURES=3D +noasr:? > > Thanks, > > Ganael LAPLANCHE escreveu no dia segunda, > 5/06/2023 =C3=A0(s) 11:20: > >> The branch main has been updated by martymac: >> >> URL: >> https://cgit.FreeBSD.org/ports/commit/?id=3Df05f6dcedb5dad5b7b515ebede9b= f6a58de1d46c >> >> commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c >> Author: Ganael LAPLANCHE >> AuthorDate: 2023-06-05 10:18:04 +0000 >> Commit: Ganael LAPLANCHE >> CommitDate: 2023-06-05 10:18:04 +0000 >> >> comms/gqrx: Turn off ASLR >> >> Disable ASLR to work around the following crash: >> >> Program terminated with signal SIGSEGV, Segmentation fault. >> Address not mapped to object. >> --Type for more, q to quit, c to continue without paging-- >> 0 0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma >> (result=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_poin= ts=3D289) >> at >> /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_= 32f.h:833 >> 833 dotProduct +=3D ((*aPtr++) * (*bPtr++)); >> [Current thread is 1 (LWP 126875)] >> (gdb) bt >> 0 0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma >> (result=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_poin= ts=3D289) >> at >> /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_= 32f.h:833 >> 1 0x000000082e776b17 in __volk_32f_x2_dot_prod_32f_a >> (result=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_poin= ts=3D289) >> at /usr/ports/devel/volk/work/.build/lib/volk.c:5336 >> 2 0x0000000825fe0b83 in gr::filter::kernel::fir_filter> float>::filterN(float*, float const*, unsigned long) () from >> /usr/local/lib/libgnuradio-filter.so.3.8.4 >> --- >> comms/gqrx/Makefile | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/comms/gqrx/Makefile b/comms/gqrx/Makefile >> index 927e049b2774..2974b7542287 100644 >> --- a/comms/gqrx/Makefile >> +++ b/comms/gqrx/Makefile >> @@ -1,6 +1,7 @@ >> PORTNAME=3D gqrx >> PORTVERSION=3D 2.16 >> DISTVERSIONPREFIX=3D v >> +PORTREVISION=3D 1 >> PORTEPOCH=3D 1 >> CATEGORIES=3D comms hamradio >> >> @@ -31,7 +32,9 @@ LIB_DEPENDS=3D libgnuradio-runtime.so:comms/gnuradio = \ >> libjack.so:audio/jack \ >> libportaudio.so:audio/portaudio >> >> -USES=3D cmake compiler:c++11-lang gl pkgconfig qt:5 >> +USES=3D cmake compiler:c++11-lang elfctl gl pkgconfig qt:5 >> + >> +ELF_FEATURES=3D +noaslr:src/gqrx >> >> USE_GITHUB=3D yes >> GH_ACCOUNT=3D gqrx-sdr >> > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000a94bc005fd5fcf95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(...)

Find it:
# Change an ELF binary's feature control note
#
# Fea= ture: =C2=A0 =C2=A0 =C2=A0elfctl
# Usage: =C2=A0 =C2=A0 =C2=A0 =C2=A0USE= S=3Delfctl
# Valid ARGS: =C2=A0 none
#
# Variables
#
# =C2= =A0 ELF_FEATURES=3D =C2=A0 =C2=A0 =C2=A0 featurelist:path/to/file1 \
# = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 featurelist:path/to/file1 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 featurelist:path/to/file2
= #
# The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC= }.
#

Nice!

Nuno Teixeira <eduardo@freebsd.org> escreveu no dia= segunda, 5/06/2023 =C3=A0(s) 11:49:
Hello Ganael,

I didn't know that were a way to disabling aslr in a port! This = is really nice.

I'm having a lot of segfaults = and tab crashing on firefox @aarch64 and mikael@ sugested turning it off = to see if it fixes.
I will test first with sysctl aslr off and if= it works I will test port option.

So syntax is:

USES+=3D elfctl

<= /div>
G= anael LAPLANCHE <martymac@freebsd.org> escreveu no dia segunda, 5/06/2023 =C3=A0(s= ) 11:20:
The bra= nch main has been updated by martymac:

URL: https://cgi= t.FreeBSD.org/ports/commit/?id=3Df05f6dcedb5dad5b7b515ebede9bf6a58de1d46c

commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c
Author:=C2=A0 =C2=A0 =C2=A0Ganael LAPLANCHE <martymac@FreeBSD.org> AuthorDate: 2023-06-05 10:18:04 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2023-06-05 10:18:04 +0000

=C2=A0 =C2=A0 comms/gqrx: Turn off ASLR

=C2=A0 =C2=A0 Disable ASLR to work around the following crash:

=C2=A0 =C2=A0 Program terminated with signal SIGSEGV, Segmentation fault. =C2=A0 =C2=A0 Address not mapped to object.
=C2=A0 =C2=A0 --Type <RET> for more, q to quit, c to continue without= paging--
=C2=A0 =C2=A0 0=C2=A0 0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2= _fma (result=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_po= ints=3D289) at /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_= x2_dot_prod_32f.h:833
=C2=A0 =C2=A0 833=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dotProduct= +=3D ((*aPtr++) * (*bPtr++));
=C2=A0 =C2=A0 [Current thread is 1 (LWP 126875)]
=C2=A0 =C2=A0 (gdb) bt
=C2=A0 =C2=A0 0=C2=A0 0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2= _fma (result=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_po= ints=3D289) at /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_= x2_dot_prod_32f.h:833
=C2=A0 =C2=A0 1=C2=A0 0x000000082e776b17 in __volk_32f_x2_dot_prod_32f_a (r= esult=3D0x85185d7e0, input=3D0x906a9ab80, taps=3D0x8927eaa00, num_points=3D= 289) at /usr/ports/devel/volk/work/.build/lib/volk.c:5336
=C2=A0 =C2=A0 2=C2=A0 0x0000000825fe0b83 in gr::filter::kernel::fir_filter&= lt;float, float, float>::filterN(float*, float const*, unsigned long) ()= from /usr/local/lib/libgnuradio-filter.so.3.8.4
---
=C2=A0comms/gqrx/Makefile | 5 ++++-
=C2=A01 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/comms/gqrx/Makefile b/comms/gqrx/Makefile
index 927e049b2774..2974b7542287 100644
--- a/comms/gqrx/Makefile
+++ b/comms/gqrx/Makefile
@@ -1,6 +1,7 @@
=C2=A0PORTNAME=3D=C2=A0 =C2=A0 =C2=A0 gqrx
=C2=A0PORTVERSION=3D=C2=A0 =C2=A02.16
=C2=A0DISTVERSIONPREFIX=3D=C2=A0 =C2=A0 =C2=A0v
+PORTREVISION=3D=C2=A0 1
=C2=A0PORTEPOCH=3D=C2=A0 =C2=A0 =C2=A01
=C2=A0CATEGORIES=3D=C2=A0 =C2=A0 comms hamradio

@@ -31,7 +32,9 @@ LIB_DEPENDS=3D=C2=A0 libgnuradio-runtime.so:comms/gnuradi= o \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libjack.so:audio/ja= ck \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libportaudio.so:aud= io/portaudio

-USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmake compiler:c++11-lang gl pkg= config qt:5
+USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmake compiler:c++11-lang elfctl= gl pkgconfig qt:5
+
+ELF_FEATURES=3D=C2=A0 +noaslr:src/gqrx

=C2=A0USE_GITHUB=3D=C2=A0 =C2=A0 yes
=C2=A0GH_ACCOUNT=3D=C2=A0 =C2=A0 gqrx-sdr


--
Nuno Teixeira
FreeBSD Committ= er (ports)


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000a94bc005fd5fcf95--