mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: <mark.rutland@arm.com>, <Suzuki.Poulose@arm.com>,
	<Catalin.Marinas@arm.com>
Cc: <klimov.linux@gmail.com>, <ddaney.cavm@gmail.com>,
	<ard.biesheuvel@linaro.org>, <will.deacon@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <yury.norov@gmail.com>,
	Yury Norov <ynorov@caviumnetworks.com>
Subject: [PATCH v2 0/2] arm64: introduce run-time detection of aarch32 support
Date: Wed, 2 Sep 2015 17:00:36 +0300	[thread overview]
Message-ID: <1441202438-27005-1-git-send-email-ynorov@caviumnetworks.com> (raw)

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


             reply	other threads:[~2015-09-02 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 14:00 Yury Norov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441202438-27005-1-git-send-email-ynorov@caviumnetworks.com \
    --to=ynorov@caviumnetworks.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=ddaney.cavm@gmail.com \
    --cc=klimov.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will.deacon@arm.com \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®