From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10238 Path: news.gmane.org!not-for-mail From: Nathan McSween Newsgroups: gmane.linux.lib.musl.general Subject: Re: request for help with aux Date: Mon, 27 Jun 2016 21:49:35 +0000 Message-ID: References: <20160627210013.GA7422@gordon> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114712249e52660536497f3e X-Trace: ger.gmane.org 1467064215 13558 80.91.229.3 (27 Jun 2016 21:50:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 21:50:15 +0000 (UTC) Cc: Mark Winterrowd To: musl@lists.openwall.com Original-X-From: musl-return-10251-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 27 23:50:00 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bHePo-00066J-48 for gllmg-musl@m.gmane.org; Mon, 27 Jun 2016 23:50:00 +0200 Original-Received: (qmail 28471 invoked by uid 550); 27 Jun 2016 21:49:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 28450 invoked from network); 27 Jun 2016 21:49:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yeLh8tL3vshVM5IQceHlVqAOVPdiQIl9AqB+rs+95M4=; b=VxoVGSTu5R2AOIVmsze4tFs+OPFzkpmL56PHf3MMhBJzaZhp1k/mdZT/tOuqTiK7QE y0mQFmtxy4G3MhRelPvi54dlA1ZFnGIwBFN8Tn3Q9Kvy0CgBTYqHoyBKbb3Iw16r1qHi PXPTUkauvb0k2jJ/NvmhAkp5HNTftTlx+PkM8urbHWfQ6DtudZJwFZa3rZn9hoNwJ+PE sU09rBr6eHC/6QSEyg6Z8FzRWESrOKqVgD+seFsQ3OE+ZCihqhEzr0UMco4s0ytwtVvW nZxiqKr83JNQZdHI8X3iKvYfmQLPhLf8Wv+cAaHURbQVtzKOXtJ2meGW/rKlxvcgGRMX HbxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yeLh8tL3vshVM5IQceHlVqAOVPdiQIl9AqB+rs+95M4=; b=UjlvID2NcAryltkJP//Cx4bgNzSqgPMv3HCIJMAY2Ip77w0tgGzkRI8V7Vt5DipQgu VMntcrabKqnYQvJfVspyHaA9X7j2kekeEJ9C6xrLHuywkGGlzYf8GWMCZZJ+q5yARN6n yLiXIieAdBYL3kFuejca0W7TTxnLeE5UGVLDb8yDFTvYTEQaBhhYFhvgbX/alluLFG0p iW68DoXFGti4CsAIcdQui4mHJEH6WBTufzWm0DTldSo6C+wmBPl+ugomodZqIif2888F 3jhtc2dfxdl9ikx/hhhEI6Uht2oReCso7pNGZiRqKCQYEo+DodyTTdi+MvWcVanP93W0 oTsw== X-Gm-Message-State: ALyK8tIzX3YYMyQXsQtV0vv2PGbLBsum4wdD5IinBNOTAzpjeNHE+SREaD9oMal6Or0PdIAcZSCRvhn8EXi48Q== X-Received: by 10.129.111.5 with SMTP id k5mr12845793ywc.12.1467064185146; Mon, 27 Jun 2016 14:49:45 -0700 (PDT) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:10238 Archived-At: --001a114712249e52660536497f3e Content-Type: text/plain; charset=UTF-8 Aux vec is used in things like SSP, so disabling aux would use a guessable value for SSP, iirc static linking still uses the aux vec for SSP On Mon, Jun 27, 2016, 2:34 PM Daniel Wilkerson wrote: > Ah, thank you. From that page: > > This function is a nonstandard glibc extension. > > And: > > The primary consumer of the information in the auxiliary vector is > the dynamic linker ld-linux.so(8). The auxiliary vector is a > convenient and efficient shortcut that allows the kernel to > communicate a certain set of standard information that the dynamic > linker usually or always needs. In some cases, the same information > could be obtained by system calls, but using the auxiliary vector is > cheaper. > > It seems therefore that if I am doing static linking that it is safe > to simply provide an empty aux vector? > > Daniel > > On Mon, Jun 27, 2016 at 2:00 PM, Bobby Bingham > wrote: > > On Mon, Jun 27, 2016 at 01:07:59PM -0700, Daniel Wilkerson wrote: > >> This seems to initalize aux to be all zeros, so it seems that in > >> theory all of the aux values could be optional: > >> > >> size_t i, *auxv, aux[AUX_CNT] = { 0 }; > >> > >> What I'm wondering is where to find the semantics of all of the aux > >> names; I could hunt through all of the code, but any high-level > >> suggestions you could provide could help a lot. As a bonus, which > >> ones might not have sensible defaults and are actually non-optional, > >> if any. > > > > The getauxval man page is a good starting point: > > http://man7.org/linux/man-pages/man3/getauxval.3.html > > > > -- > > Bobby > --001a114712249e52660536497f3e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Aux vec is used in things like SSP, so disabling aux would u= se a guessable value for SSP, iirc static linking still uses the aux vec fo= r SSP


On Mon, Jun 27, 2016, 2:34 = PM Daniel Wilkerson <danie= l.wilkerson@gmail.com> wrote:
koorogi@koorogi.info> wrote:
> On Mon, Jun 27, 2016 at 01:07:59PM -0700, Daniel Wilkerson wrote:
>> This seems to initalize aux to be all zeros, so it seems that in >> theory all of the aux values could be optional:
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0size_t i, *auxv, aux[AUX_CNT] =3D= { 0 };
>>
>> What I'm wondering is where to find the semantics of all of th= e aux
>> names; I could hunt through all of the code, but any high-level >> suggestions you could provide could help a lot.=C2=A0 As a bonus, = which
>> ones might not have sensible defaults and are actually non-optiona= l,
>> if any.
>
> The getauxval man page is a good starting point:
> http://man7.org/linux/man-pages/man3/geta= uxval.3.html
>
> --
> Bobby
--001a114712249e52660536497f3e--