Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jun 2023 12:00:18 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Ganael LAPLANCHE <martymac@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: f05f6dcedb5d - main - comms/gqrx: Turn off ASLR
Message-ID:  <CAFDf7UJCtMCew9XH1cwmVQ9v_vxOYX=nO4B5zGxn93YYBNH1XQ@mail.gmail.com>
In-Reply-To: <CAFDf7ULNC7JWYfYjo0pwz1dXYqMxVPP9TVxd_gvyL7Q8aFemEA@mail.gmail.com>
References:  <202306051020.355AKv8s099426@gitrepo.freebsd.org> <CAFDf7ULNC7JWYfYjo0pwz1dXYqMxVPP9TVxd_gvyL7Q8aFemEA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
(...)

Find it:

# Change an ELF binary's feature control note
#
# Feature:      elfctl
# Usage:        USES=elfctl
# Valid ARGS:   none
#
# Variables
#
#   ELF_FEATURES=       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 <eduardo@freebsd.org> escreveu no dia segunda, 5/06/2023 à(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+= elfctl
> ELF_FEATURES= +noasr:<path_to_something>?
>
> Thanks,
>
> Ganael LAPLANCHE <martymac@freebsd.org> escreveu no dia segunda,
> 5/06/2023 à(s) 11:20:
>
>> The branch main has been updated by martymac:
>>
>> URL:
>> https://cgit.FreeBSD.org/ports/commit/?id=f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c
>>
>> commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c
>> Author:     Ganael LAPLANCHE <martymac@FreeBSD.org>
>> AuthorDate: 2023-06-05 10:18:04 +0000
>> Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
>> 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 <RET> for more, q to quit, c to continue without paging--
>>     0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma
>> (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
>> at
>> /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_32f.h:833
>>     833             dotProduct += ((*aPtr++) * (*bPtr++));
>>     [Current thread is 1 (LWP 126875)]
>>     (gdb) bt
>>     0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma
>> (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
>> 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=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289)
>> at /usr/ports/devel/volk/work/.build/lib/volk.c:5336
>>     2  0x0000000825fe0b83 in gr::filter::kernel::fir_filter<float, float,
>> 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=      gqrx
>>  PORTVERSION=   2.16
>>  DISTVERSIONPREFIX=     v
>> +PORTREVISION=  1
>>  PORTEPOCH=     1
>>  CATEGORIES=    comms hamradio
>>
>> @@ -31,7 +32,9 @@ LIB_DEPENDS=  libgnuradio-runtime.so:comms/gnuradio \
>>                 libjack.so:audio/jack \
>>                 libportaudio.so:audio/portaudio
>>
>> -USES=          cmake compiler:c++11-lang gl pkgconfig qt:5
>> +USES=          cmake compiler:c++11-lang elfctl gl pkgconfig qt:5
>> +
>> +ELF_FEATURES=  +noaslr:src/gqrx
>>
>>  USE_GITHUB=    yes
>>  GH_ACCOUNT=    gqrx-sdr
>>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)

[-- Attachment #2 --]
<div dir="ltr"><div>(...)</div><div><br></div><div>Find it:</div><div><br></div><div># Change an ELF binary&#39;s feature control note<br>#<br># Feature:      elfctl<br># Usage:        USES=elfctl<br># Valid ARGS:   none<br>#<br># Variables<br>#<br>#   ELF_FEATURES=       featurelist:path/to/file1 \<br>#                       featurelist:path/to/file1 \<br>                        featurelist:path/to/file2<br>#<br># The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC}.<br>#</div><div><br></div><div>Nice!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Nuno Teixeira &lt;<a href="mailto:eduardo@freebsd.org">eduardo@freebsd.org</a>&gt; escreveu no dia segunda, 5/06/2023 à(s) 11:49:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello Ganael,</div><div><br></div><div>I didn&#39;t know that were a way to disabling aslr in a port! This is really nice.</div><div><br></div><div>I&#39;m having a lot of segfaults and tab crashing on firefox <a class="gmail_plusreply" id="m_-202790218279632959plusReplyChip-0">@aarch64</a> and mikael@ sugested turning it off to see if it fixes.</div><div>I will test first with sysctl aslr off and if it works I will test port option.</div><div><br></div><div>So syntax is:</div><div><br></div><div>USES+= elfctl</div><div>ELF_FEATURES= <a class="gmail_plusreply" id="m_-202790218279632959plusReplyChip-2">+noasr:&lt;path_to_something&gt;?</a></div><div><a class="gmail_plusreply" id="m_-202790218279632959plusReplyChip-2"><br></a></div><div><a class="gmail_plusreply" id="m_-202790218279632959plusReplyChip-2">Thanks,<br></a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ganael LAPLANCHE &lt;<a href="mailto:martymac@freebsd.org" target="_blank">martymac@freebsd.org</a>&gt; escreveu no dia segunda, 5/06/2023 à(s) 11:20:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The branch main has been updated by martymac:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/ports/commit/?id=f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/ports/commit/?id=f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c</a><br>;
<br>
commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c<br>
Author:     Ganael LAPLANCHE &lt;martymac@FreeBSD.org&gt;<br>
AuthorDate: 2023-06-05 10:18:04 +0000<br>
Commit:     Ganael LAPLANCHE &lt;martymac@FreeBSD.org&gt;<br>
CommitDate: 2023-06-05 10:18:04 +0000<br>
<br>
    comms/gqrx: Turn off ASLR<br>
<br>
    Disable ASLR to work around the following crash:<br>
<br>
    Program terminated with signal SIGSEGV, Segmentation fault.<br>
    Address not mapped to object.<br>
    --Type &lt;RET&gt; for more, q to quit, c to continue without paging--<br>
    0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289) at /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_32f.h:833<br>
    833             dotProduct += ((*aPtr++) * (*bPtr++));<br>
    [Current thread is 1 (LWP 126875)]<br>
    (gdb) bt<br>
    0  0x000000082e9feecf in volk_32f_x2_dot_prod_32f_a_avx2_fma (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289) at /usr/ports/devel/volk/work/volk-2.5.1/kernels/volk/volk_32f_x2_dot_prod_32f.h:833<br>
    1  0x000000082e776b17 in __volk_32f_x2_dot_prod_32f_a (result=0x85185d7e0, input=0x906a9ab80, taps=0x8927eaa00, num_points=289) at /usr/ports/devel/volk/work/.build/lib/volk.c:5336<br>
    2  0x0000000825fe0b83 in gr::filter::kernel::fir_filter&lt;float, float, float&gt;::filterN(float*, float const*, unsigned long) () from /usr/local/lib/libgnuradio-filter.so.3.8.4<br>
---<br>
 comms/gqrx/Makefile | 5 ++++-<br>
 1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/comms/gqrx/Makefile b/comms/gqrx/Makefile<br>
index 927e049b2774..2974b7542287 100644<br>
--- a/comms/gqrx/Makefile<br>
+++ b/comms/gqrx/Makefile<br>
@@ -1,6 +1,7 @@<br>
 PORTNAME=      gqrx<br>
 PORTVERSION=   2.16<br>
 DISTVERSIONPREFIX=     v<br>
+PORTREVISION=  1<br>
 PORTEPOCH=     1<br>
 CATEGORIES=    comms hamradio<br>
<br>
@@ -31,7 +32,9 @@ LIB_DEPENDS=  libgnuradio-runtime.so:comms/gnuradio \<br>
                libjack.so:audio/jack \<br>
                libportaudio.so:audio/portaudio<br>
<br>
-USES=          cmake compiler:c++11-lang gl pkgconfig qt:5<br>
+USES=          cmake compiler:c++11-lang elfctl gl pkgconfig qt:5<br>
+<br>
+ELF_FEATURES=  +noaslr:src/gqrx<br>
<br>
 USE_GITHUB=    yes<br>
 GH_ACCOUNT=    gqrx-sdr<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committer (ports)</span></div></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committer (ports)</span></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJCtMCew9XH1cwmVQ9v_vxOYX=nO4B5zGxn93YYBNH1XQ>