lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 16 Nov 2012 16:53:54 -0600
From:	Ryan Arnold <rsa@...ibm.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:	"libc-alpha@...rceware.org" <libc-alpha@...rceware.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [RFC] Expand available hwcap bits with AT_HWCAP2 in auxv

Hi,

We're out of bits in the AT_HWCAP entry for PowerPC. Per the following
discussion on libc-alpha, I'd like to propose the expansion of the auxv
to make additional space available for further system feature flags.  

http://www.sourceware.org/ml/libc-alpha/2012-10/msg00438.html

There are a few ways to do this (as pointed out by Ben Herrenschmidt).
glibc would prefer to parse an AT_HWCAP2 entry from the auxv and compose
those bits into the high 32-bits of the existing glibc uint64_t hwcap
field.

Currently, the high 32-bits of this field are only available in 64-bit
userspace, and only for platforms where the kernel designates the auxv
hwcap as unsigned long int (example: s390). Platforms like PowerPC, arm,
and x86 maintain parity between 64-bit and 32-bit userspace and thus
only allow 32-bits for capabilities.

I propose that the kernel shift capabilities designated in the high
32-bits into an AT_HWCAP2 auxv entry. In userspace, glibc will compose
that into the available high 32-bits of glibc's hwcap field making the
rest of it available to all platforms.

The beauty of this approach is that if either the Kernel or glibc lack
the AT_HWCAP2 improvement the high 32-bits of glibc's hwcap field will
remain empty, i.e., feature not available.

With this in mind, I need to reserve an identifier in
include/linux/auxvec.h for AT_HWCAP2.  I was thinking:

#define AT_HWCAP  26

GLIBC will have parity with this identifier in elf/elf.h.

I think Ben H. had planned to work on the kernel side of this and I have
a GLIBC patch in process.

Comments?

Ryan S. Arnold
IBM Linux Technology Center
glibc PowerPC maintainer

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ