This series is a followup to the patch that was recently merged by Catalin that
allocates hwcaps bits for CRC and Crypto Extensions instructions so userland can
discover whether the current CPU has any of those capabilities.
Patch #1 enables ARM support for the ELF_HWCAP2/AT_HWCAP2 ELF auxv entry that
was recently added to the kernel and glibc (2.18). It extends the feature bit
space to 64 bits (on 32-bit architectures)
Patch #2 adds generic support for ELF_HWCAP2/AT_HWCAP2 to the 32-bit ELF compat
mode for 64-bit architectures.
Patch #3 adds support for ELF_HWCAP2/AT_HWCAP2 to arm64's 32-bit ELF compat mode
Patch #4 allocates the HWCAP2 bits in the arch/arm tree. This is necessary
because 32-bit ARM binaries can execute both under ARM and under arm64 kernels,
so there should be agreement about the meaning of feature bits, even if the ARM
kernel has no support yet for ARMv8 32-bit only hardware (such as ARMv8-R)
Patch #5 advertises the CRC and Crypto Extensions to 32-bit ELF binaries running
under an arm64 kernel.
v2 changes:
- omitted 2 arm64 specific patches that have already been merged by Catalin
- move ARM feature bits to HWCAP2
Ard Biesheuvel (5):
ARM: add support for AT_HWCAP2 ELF auxv entry
binfmt_elf: add ELF_HWCAP2 to compat auxv entries
arm64: add AT_HWCAP2 support for 32-bit compat
ARM: introduce HWCAP2 feature bits for ARMv8 Crypto Extensions
arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries
arch/arm/include/asm/hwcap.h | 3 ++-
arch/arm/include/uapi/asm/hwcap.h | 9 +++++++++
arch/arm/kernel/setup.c | 16 ++++++++++++++++
arch/arm64/include/asm/hwcap.h | 9 ++++++++-
arch/arm64/kernel/setup.c | 33 +++++++++++++++++++++++++++++++++
fs/compat_binfmt_elf.c | 5 +++++
6 files changed, 73 insertions(+), 2 deletions(-)
--
1.8.3.2
Add ELF_HWCAP2 to the set of auxv entries that is passed to
a 32-bit ELF program running in 32-bit compat mode under a
64-bit kernel.
Signed-off-by: Ard Biesheuvel <redacted>
---
fs/compat_binfmt_elf.c | 5 +++++
1 file changed, 5 insertions(+)
This enables AT_HWCAP2 for ARM. The generic support for this
new ELF auxv entry was added in commit 2171364d1a9 (powerpc:
Add HWCAP2 aux entry)
Signed-off-by: Ard Biesheuvel <redacted>
---
arch/arm/include/asm/hwcap.h | 3 ++-
arch/arm/include/uapi/asm/hwcap.h | 4 ++++
arch/arm/kernel/setup.c | 11 +++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
This adds support for advertising the presence of ARMv8 Crypto
Extensions in the Aarch32 execution state to 32-bit ELF binaries
running in 32-bit compat mode under the arm64 kernel.
Signed-off-by: Ard Biesheuvel <redacted>
---
arch/arm64/include/asm/hwcap.h | 6 ++++++
arch/arm64/kernel/setup.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
On 17 January 2014 16:07, Will Deacon [off-list ref] wrote:
Hi Ard,
On Fri, Jan 17, 2014 at 09:23:07AM +0000, Ard Biesheuvel wrote:
quoted
This enables AT_HWCAP2 for ARM. The generic support for this
new ELF auxv entry was added in commit 2171364d1a9 (powerpc:
Add HWCAP2 aux entry)
Does this require a corresponding change in libc so that the entry is
actually used by the dynamic linker?
The auxv entry itself is already wired up [this includes getauxval()]
https://sourceware.org/git/?p=glibc.git;a=commit;h=1ae8bfe07c1a
The only thing that is lacking is a way to hook up ifunc relocation,
as the current prototype passes a single 32-bit quantity.
So either we change the prototype to (hwcap, hwcap2) or we need to
rely on getauxval() in ifunc selectors if they need to inspect hwcap2
--
Ard.
On Thu, Jan 23, 2014 at 03:01:23PM +0000, Catalin Marinas wrote:
On Fri, Jan 17, 2014 at 09:23:06AM +0000, Ard Biesheuvel wrote:
quoted
Ard Biesheuvel (5):
ARM: add support for AT_HWCAP2 ELF auxv entry
binfmt_elf: add ELF_HWCAP2 to compat auxv entries
arm64: add AT_HWCAP2 support for 32-bit compat
ARM: introduce HWCAP2 feature bits for ARMv8 Crypto Extensions
arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries
I think I acked this series but probably after you posted the resend.
Just in case I haven't:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Just to get things moving on this, I suggest you get an ack on the
binfmt_elf patch from Al Viro and linux-fsdevel or get them to merge
this patch. Afterwards, if there are no further comments from Russell,
you should send the arm patches to the patch system. Only after that
I'll update the compat arm64 support. Feel free to add my ack on the
whole series.
Thanks.
--
Catalin
On 5 February 2014 14:37, Catalin Marinas [off-list ref] wrote:
On Thu, Jan 23, 2014 at 03:01:23PM +0000, Catalin Marinas wrote:
quoted
On Fri, Jan 17, 2014 at 09:23:06AM +0000, Ard Biesheuvel wrote:
quoted
Ard Biesheuvel (5):
ARM: add support for AT_HWCAP2 ELF auxv entry
binfmt_elf: add ELF_HWCAP2 to compat auxv entries
arm64: add AT_HWCAP2 support for 32-bit compat
ARM: introduce HWCAP2 feature bits for ARMv8 Crypto Extensions
arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries
I think I acked this series but probably after you posted the resend.
Just in case I haven't:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Just to get things moving on this, I suggest you get an ack on the
binfmt_elf patch from Al Viro and linux-fsdevel or get them to merge
this patch. Afterwards, if there are no further comments from Russell,
you should send the arm patches to the patch system. Only after that
I'll update the compat arm64 support. Feel free to add my ack on the
whole series.
ARM patches submitted to the patch system as 7981/1 and 7982/1
Regards,
Ard.