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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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 > ELF_FEATURES=3D +noasr:<path_to_something>? > > Thanks, > > Ganael LAPLANCHE <martymac@freebsd.org> 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 <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=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, 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=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 <div dir=3D"ltr"><div>(...)</div><div><br></div><div>Find it:</div><div><br= ></div><div># Change an ELF binary's feature control note<br>#<br># Fea= ture: =C2=A0 =C2=A0 =C2=A0elfctl<br># Usage: =C2=A0 =C2=A0 =C2=A0 =C2=A0USE= S=3Delfctl<br># Valid ARGS: =C2=A0 none<br>#<br># Variables<br>#<br># =C2= =A0 ELF_FEATURES=3D =C2=A0 =C2=A0 =C2=A0 featurelist:path/to/file1 \<br># = =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 \<br>=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<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=3D"gma= il_quote"><div dir=3D"ltr" class=3D"gmail_attr">Nuno Teixeira <<a href= =3D"mailto:eduardo@freebsd.org">eduardo@freebsd.org</a>> escreveu no dia= segunda, 5/06/2023 =C3=A0(s) 11:49:<br></div><blockquote class=3D"gmail_qu= ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20= 4);padding-left:1ex"><div dir=3D"ltr"><div>Hello Ganael,</div><div><br></di= v><div>I didn't know that were a way to disabling aslr in a port! This = is really nice.</div><div><br></div><div>I'm having a lot of segfaults = and tab crashing on firefox <a class=3D"gmail_plusreply" id=3D"m_-202790218= 279632959plusReplyChip-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+=3D elfctl</div><div>ELF_FEATURES=3D <a class= =3D"gmail_plusreply" id=3D"m_-202790218279632959plusReplyChip-2">+noasr:<= ;path_to_something>?</a></div><div><a class=3D"gmail_plusreply" id=3D"m_= -202790218279632959plusReplyChip-2"><br></a></div><div><a class=3D"gmail_pl= usreply" id=3D"m_-202790218279632959plusReplyChip-2">Thanks,<br></a></div><= /div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">G= anael LAPLANCHE <<a href=3D"mailto:martymac@freebsd.org" target=3D"_blan= k">martymac@freebsd.org</a>> escreveu no dia segunda, 5/06/2023 =C3=A0(s= ) 11:20:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px= 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The bra= nch main has been updated by martymac:<br> <br> URL: <a href=3D"https://cgit.FreeBSD.org/ports/commit/?id=3Df05f6dcedb5dad5= b7b515ebede9bf6a58de1d46c" rel=3D"noreferrer" target=3D"_blank">https://cgi= t.FreeBSD.org/ports/commit/?id=3Df05f6dcedb5dad5b7b515ebede9bf6a58de1d46c</= a><br> <br> commit f05f6dcedb5dad5b7b515ebede9bf6a58de1d46c<br> Author:=C2=A0 =C2=A0 =C2=A0Ganael LAPLANCHE <martymac@FreeBSD.org><br= > AuthorDate: 2023-06-05 10:18:04 +0000<br> Commit:=C2=A0 =C2=A0 =C2=A0Ganael LAPLANCHE <martymac@FreeBSD.org><br= > CommitDate: 2023-06-05 10:18:04 +0000<br> <br> =C2=A0 =C2=A0 comms/gqrx: Turn off ASLR<br> <br> =C2=A0 =C2=A0 Disable ASLR to work around the following crash:<br> <br> =C2=A0 =C2=A0 Program terminated with signal SIGSEGV, Segmentation fault.<b= r> =C2=A0 =C2=A0 Address not mapped to object.<br> =C2=A0 =C2=A0 --Type <RET> for more, q to quit, c to continue without= paging--<br> =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<br> =C2=A0 =C2=A0 833=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dotProduct= +=3D ((*aPtr++) * (*bPtr++));<br> =C2=A0 =C2=A0 [Current thread is 1 (LWP 126875)]<br> =C2=A0 =C2=A0 (gdb) bt<br> =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<br> =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<br> =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<br> ---<br> =C2=A0comms/gqrx/Makefile | 5 ++++-<br> =C2=A01 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> =C2=A0PORTNAME=3D=C2=A0 =C2=A0 =C2=A0 gqrx<br> =C2=A0PORTVERSION=3D=C2=A0 =C2=A02.16<br> =C2=A0DISTVERSIONPREFIX=3D=C2=A0 =C2=A0 =C2=A0v<br> +PORTREVISION=3D=C2=A0 1<br> =C2=A0PORTEPOCH=3D=C2=A0 =C2=A0 =C2=A01<br> =C2=A0CATEGORIES=3D=C2=A0 =C2=A0 comms hamradio<br> <br> @@ -31,7 +32,9 @@ LIB_DEPENDS=3D=C2=A0 libgnuradio-runtime.so:comms/gnuradi= o \<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libjack.so:audio/ja= ck \<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libportaudio.so:aud= io/portaudio<br> <br> -USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmake compiler:c++11-lang gl pkg= config qt:5<br> +USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmake compiler:c++11-lang elfctl= gl pkgconfig qt:5<br> +<br> +ELF_FEATURES=3D=C2=A0 +noaslr:src/gqrx<br> <br> =C2=A0USE_GITHUB=3D=C2=A0 =C2=A0 yes<br> =C2=A0GH_ACCOUNT=3D=C2=A0 =C2=A0 gqrx-sdr<br> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l= tr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committ= er (ports)</span></div></div> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l= tr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committ= er (ports)</span></div></div> --000000000000a94bc005fd5fcf95--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJCtMCew9XH1cwmVQ9v_vxOYX=nO4B5zGxn93YYBNH1XQ>