eal: abstract away the auxiliary vector
authorAaron Conole <aconole@redhat.com>
Mon, 2 Apr 2018 18:24:34 +0000 (14:24 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 25 Apr 2018 02:29:00 +0000 (04:29 +0200)
commit2ed9bf330709e75c2f066f6ec13ece1ecdb4e9db
treedb54cf9e299effc581fc1ddd276fc0594ab50c79
parent8b50041c0b71789916905817749d99104802ecc8
eal: abstract away the auxiliary vector

Rather than attempting to load the contents of the auxv directly,
prefer to use an exposed API - and if that doesn't exist then attempt
to load the vector.  This is because on some systems, when a user
is downgraded, the /proc/self/auxv file retains the old ownership
and permissions.  The original method of /proc/self/auxv is retained.

This also removes a potential abort() in the code when compiled with
NDEBUG.  A quick parse of the code shows that many (if not all) of
the CPU flag parsing isn't used internally, so it should be okay.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
lib/librte_eal/common/arch/arm/rte_cpuflags.c
lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
lib/librte_eal/common/eal_common_cpuflags.c
lib/librte_eal/common/include/generic/rte_cpuflags.h