From nobody Sat Feb 05 01:40:25 2022 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 8813C19B67E1 for ; Sat, 5 Feb 2022 01:40:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-25.consmr.mail.gq1.yahoo.com (sonic303-25.consmr.mail.gq1.yahoo.com [98.137.64.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JrFTx22n3z4Wwr for ; Sat, 5 Feb 2022 01:40:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1644025230; bh=qgA6DjriH87dZp05zWaLIaUkB6V86RDuYwRCjL8BNuw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=orc6tM/UmuEzqtGn47Ym2HV/J7Lt1/T0tNbdGwquom1xWuLdBPGRijv55w0vRhhcFrLqcy43YfAP8Fl7cCMXTEIuujPID+YyAJ2NX2zqdEcxl5g/31NHzeN29OcOjDzS5y2QUhbY9Aq1zfhiZ40ngXC6pIuKQInoSo20WfRJ2jo1v9RA2uArMoWKVkICWXd/RBnONdp7Jn+/l8I3MtI1AOvG78FnmGHdm+GgmsXkyUDf7oA5dfjTGR8LpLwGaBYBJcCcof5ja8kkjOJgZ7dYDFpGOBaD1DzaR/3J/IsXnyb3gbzJBQYYQPgODK3zXQS/wMc3qPio2XxeW48UudZ+Gw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1644025230; bh=6f27TDYWScYxB1tBWQQ51OmaxD+esuNvZI8yzZcRGS/=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=PeoGLhI/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Ws7BlViT_e.nTQb9swF.n FfIYol_z5vyDwRwE9VK7FIP4IsbbmQxD_IX6Fhs59U4.Ki6c61AJsLS5MaK.QXMXyLkU5aYL6cGZ clhPtefqjJTZH2vKHhpBJTetzASVOeMpTM6ywdNeF7Kp.02vPnCj_Q.jnDYxwvl9xDdsWzhK85f9 DQ4ZxMICIH0N1cgRrblTUra.od50OXHnd_osU2NyWD6o1cST5_2D0EVMjS4r4E7HEAo2vROyUfxb 4iqFOtcbkq3EAH97Yn1Eccq8StBtYlsZwyhqUQguhT28I.VhYvJswtlxlO0BnzFRYJ2yjH4RREQU kH2QKJde2cDPu_zH8YANFN_67.zLpxT9naE8cJwPuzfgRjaReJUK_wSHtP_q9NKLGjJJIOuFGgIN L.Z3JWBTA491EkVbekQ3HFtfd5fqB4HNu4f80VnJ9TT5wtjK9FoDjD0.w2kZGOip405w2f5cYOTI 2wNdTpOms1UrT_4eUvDGm6lYg0tp83xaISdokU7zRFDJzcZ4Y82vnowinsPk78lPZ92.PF5vB2UW PUOREbyVmjL5EMkhx X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sat, 5 Feb 2022 01:40:30 +0000 Received: by kubenode518.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 53316e02faf43f8d87d4a70f90e6ff3d; Sat, 05 Feb 2022 01:40:27 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Troubles building world on stable/13 [How to set just the compiler to avoid ASLR being enabled for it: DOES NOT WORK] From: Mark Millard In-Reply-To: <0E1C03AD-7600-4680-A27A-985E6DC64B0C@yahoo.com> Date: Fri, 4 Feb 2022 17:40:25 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <1B332BCA-B296-4DB6-96E5-272B6062ECA6@yahoo.com> References: <20220124165449.GA39982@www.zefox.net> <5FAC2B2C-7740-435E-A183-FB3EF1FCE7F9@yahoo.com> <20220202223208.GA78110@www.zefox.net> <70550346-BC53-458F-B01B-68559E5C9847@yahoo.com> <20220203015149.GA78722@www.zefox.net> <8A85F917-F4E8-4382-B777-15AF7401E616@yahoo.com> <20220204214403.GA85107@www.zefox.net> <20220205000800.GA85644@www.zefox.net> <51D494E4-6D8D-49C7-8F0C-FD53311264A5@yahoo.com> <0E1C03AD-7600-4680-A27A-985E6DC64B0C@yahoo.com> To: bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4JrFTx22n3z4Wwr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="orc6tM/U"; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.206:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.206:from]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On 2022-Feb-4, at 17:34, Mark Millard wrote: > The following shows how to examine and control the compiler's ASLR > status (notation shown presumes first cd'ing to where the c++ file > is): > > # elfctl c++ > File 'c++' features: > noaslr 'Disable ASLR' is unset. > noprotmax 'Disable implicit PROT_MAX' is unset. > nostackgap 'Disable stack gap' is unset. > wxneeded 'Requires W+X mappings' is unset. > la48 'amd64: Limit user VA to 48bit' is unset. > noaslrstkgap 'Disable ASLR stack gap' is unset. > > # elfctl -e +noaslr c++ > > # elfctl c++ > File 'c++' features: > noaslr 'Disable ASLR' is set. > noprotmax 'Disable implicit PROT_MAX' is unset. > nostackgap 'Disable stack gap' is unset. > wxneeded 'Requires W+X mappings' is unset. > la48 'amd64: Limit user VA to 48bit' is unset. > noaslrstkgap 'Disable ASLR stack gap' is unset. > > (noaslrstkgap may be fairly specific to the vintage of > main [so: 14] that I'm at and so might not show up.) > > Being tied to the file, this survives reboots. > > This should avoid needing the system wide disable > that I'd previously listed. In other words: no need > for: > > # sysctl kern.elf64.aslr.enable=0 > > (which would not survive a reboot). > Well, on testing, this did not work in my context: still can fail and still shows vm.aslr_restarts increasing the same way as before I updated the c++ file: success increments by 1 and failure increments by 2. So I'm back to indicating to use: # sysctl kern.elf64.aslr.enable=0 === Mark Millard marklmi at yahoo.com