linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: introduce run-time detection of aarch32 support
@ 2015-09-02 14:00 Yury Norov
  2015-09-02 14:00 ` [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies Yury Norov
  2015-09-02 14:00 ` [PATCH v2 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0 Yury Norov
  0 siblings, 2 replies; 6+ messages in thread
From: Yury Norov @ 2015-09-02 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

This is needed to avoid loading aarch32 binaries if COMPAT is enabled, but
aarch32 is not supported by specific platform.

First patch fixes hidden header dependencies in arch/arm64/include/asm/cpufeature.h.
It's not related to the issue, but helps to avoid build failure that happens
if one applies second patch only.

Second patch adds run-time detection of aarch32 support, and rejects kernel to
load such binaries, if not supported.

Tested on ThunderX.

V2:
 - add missing <linux/compiler.h> for the __attribute_const__ on
   cpuid_feature_extract_field;
 - move cpu_feature macro under the __ASSEMBLY__ guard.
 - check that all CPUs support AArch32, not the current only,
   the same way as for endianness support.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>

Yury Norov (2):
  arm64: cpufeature.h: resolve hidden header dependencies
  arm64: don't load 32-bit binaries if platform has no aarch32_el0

 arch/arm64/include/asm/cpufeature.h | 10 +++++++++-
 arch/arm64/include/asm/cputype.h    |  8 ++++++++
 arch/arm64/include/asm/elf.h        |  6 ++++--
 arch/arm64/kernel/cpuinfo.c         | 12 ++++++++++++
 4 files changed, 33 insertions(+), 3 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-02 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 14:00 [PATCH v2 0/2] arm64: introduce run-time detection of aarch32 support Yury Norov
2015-09-02 14:00 ` [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies Yury Norov
2015-09-02 14:23   ` Mark Rutland
2015-09-02 14:00 ` [PATCH v2 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0 Yury Norov
2015-09-02 14:15   ` Ard Biesheuvel
2015-09-02 14:38     ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).