LWN: Comments on "getauxval() and the auxiliary vector" https://lwn.net/Articles/519085/ This is a special feed containing comments posted to the individual LWN article titled "getauxval() and the auxiliary vector". en-us Wed, 15 Oct 2025 12:41:14 +0000 Wed, 15 Oct 2025 12:41:14 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net erratum: x86 cpufeatures location https://lwn.net/Articles/742386/ https://lwn.net/Articles/742386/ georg.s <div class="FormattedComment"> Actually, the x86 details are defined in<br> <p> arch/x86/include/asm/cpufeatures.h<br> <p> and not in<br> <p> arch/x86/include/asm/cpufeature.h (sic!)<br> <p> See also e.g.:<br> <p> <a rel="nofollow" href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/include/asm/cpufeatures.h?id=refs/tags/v4.14">https://git.kernel.org/pub/scm/linux/kernel/git/stable/li...</a><br> </div> Fri, 29 Dec 2017 19:43:10 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/524641/ https://lwn.net/Articles/524641/ oak <div class="FormattedComment"> Nice. Yet another way for programs to find out on what kind of a platform they're running at runtime.<br> <p> (If everything would use it instead of reading the /proc/self/auxv file directly, it would be nice, now it just means that tools like SB2 and user-space Qemu have yet another thing they need to catch &amp; override, but at least this new method is easier to override.)<br> </div> Tue, 13 Nov 2012 11:09:26 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519898/ https://lwn.net/Articles/519898/ BenHutchings <blockquote>Sorry if I am outright clueless, but it would be very interesting if it can be used for multiarch scenarios.</blockquote> <p>Multiarch and biarch requite that each coexisting architecture has a distinct dynamic linker.</p> <blockquote>Maybe to simplify mixing x64 and x86 in a distribution-agnostic fashion, or even more interesting; Not only to run the foreign code but also link to a library of foreign architecture.</blockquote> <p>This is not possible even with thunking of function calls (very expensive if you have to make 32/64-bit mode switches) as the different architectures have different memory layouts.</p> Mon, 15 Oct 2012 19:21:16 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519868/ https://lwn.net/Articles/519868/ dashesy Sorry if I am outright clueless, but it would be very interesting if it can be used for multiarch scenarios. Maybe to simplify mixing x64 and x86 in a distribution-agnostic fashion, or even more interesting; Not only <a href=http://wiki.debian.org/QemuUserEmulation>to run the foreign code</a> but also link to a library of foreign architecture. Mon, 15 Oct 2012 17:48:18 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519603/ https://lwn.net/Articles/519603/ mina86 <div class="FormattedComment"> I don't think that's a real problem. The random bytes are not available to outside applications (unless they trace it like debuggers or strace do, but in this case, it would be easier to just read the random seed or just overwrite the seed).<br> </div> Fri, 12 Oct 2012 16:44:26 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519602/ https://lwn.net/Articles/519602/ mina86 <div class="FormattedComment"> With this piece of code: <a href="https://gist.github.com/3880154">https://gist.github.com/3880154</a> and glibc 2.11 I'm able to get some value of AT_RANDOM. Checking whether glibc simply leaves it be or it fills it with some other random data is left as an exercise for the reader. ;)<br> </div> Fri, 12 Oct 2012 16:42:10 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519571/ https://lwn.net/Articles/519571/ njwhite <div class="FormattedComment"> (with apologies for the embarassing levels of ignorance this likely displays)<br> <p> Could other applications read your auxiliary vector, and hence the seed you're using? Would this then have much effect on the guessability of subsequent random numbers?<br> </div> Fri, 12 Oct 2012 12:03:31 +0000 HWCAP human readable on my 32-bit Centrino https://lwn.net/Articles/519493/ https://lwn.net/Articles/519493/ pr1268 <p>I tried <tt>sleep</tt> with <tt>LD_SHOW_AUX=1</tt> set, and my <tt>AT_HWCAP</tt> values were the human-readable processor capabilities I get when I <tt>cat /proc/cpuinfo</tt>. Plus, I had an extra entry at the beginning, <tt>AT_SYSINFO</tt>.</p> <p>FWIW I have GLIBC version 2.13 (which implies the <tt>getauxval()</tt> call isn't available to me). Just sharing my experiences here; thanks for the article!</p> Thu, 11 Oct 2012 21:46:19 +0000 getauxval() and the auxiliary vector https://lwn.net/Articles/519487/ https://lwn.net/Articles/519487/ luto <div class="FormattedComment"> Can glibc also give me a good random seed? Take AT_RANDOM, use it to seed some simple PRNG, keep the first chunk of output for a stack canary, and give me the rest. (The PRNG could be as simple as using an MGF or some large-output hash. Something like SHA-3 could be used for this purpose, since Keccak can produce any amount of output, sequentially.)<br> <p> Currently AFAIR glibc zeros AT_RANDOM after using it for its own nefarious purposes.<br> </div> Thu, 11 Oct 2012 21:20:29 +0000