From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: Android and compatibility with deprecated armv7 instructions
Date: Thu, 03 Jul 2014 20:15:32 +0200 [thread overview]
Message-ID: <4840595.cpHbY6hJKL@wuerfel> (raw)
In-Reply-To: <20140703171356.GD28175@arm.com>
On Thursday 03 July 2014 18:13:56 Catalin Marinas wrote:
> > not wanting to pollute their nice clean
> > ARM64 kernel with ARM32 "legacy junk", the fact of the matter is that
> > even the CPU is already polluted with the legacy ARM32 stuff - it
> > supports ARM32 binaries.
>
> It's not about polluting the kernel (I've seen at least one incarnation
> of such patch and, as you said, it's small), but rather setting some
> limit on how much "legacy" we add to the arm64 kernel and commit to
> maintain long term. Our stance has always been that only non-deprecated
> ARMv7 features are supported by arm64 compat (that's why I don't buy the
> breaking user-space argument). Let's say we allow non-deprecated ARMv5
> features as well (SWP), how far back to we go? I doubt anyone thinks
> ARMv4 and OABI is still needed on an arm64 kernel.
Again, the rule is that we don't break things. The request came from
Android because they have binaries that go back to ARMv5. They don't
have binaries going back to ARMv4, and they never had OABI, so it would
be pointless to go back that far.
For any of the regular non-embedded distros, they seem to be fairly
eager to break backwards compatibility on a binary level already,
so it's also very likely that they'd be interested in ARMv4 or OABI
compatibility.
If a real use case for those came up, we'd probably have to talk
about the trade-offs. I'd assume even if actual users were hurt by
the lack of OABI support on ARMv8 (which I assume they are not),
I would likely still argue that supporting it is too hard. The
security implications of supporting another (rarely used) ABI
should be enough for this.
> > However, we /do/ need the CP15 barrier instructions as well. We,
> > as kernel developers, have omitted to provide a way to tell userspace
> > whether the CP15 barrier instructions are available, *and* whether
> > the new barrier instructions are there too. So, like it or not, it
> > is /our/ failing as kernel developers that userspace is running into
> > these issues, and it is /our/ responsibility to make sure that
> > userspace does not break, irrespective of what path is chosed by
> > the raw CPU support.
>
> Such barriers currently only require an SCTLR_EL1 bit to be set. But
> what do we do in future version of the architecture if they are no
> longer present? I guess we start emulating them (or NAK architectural
> attempts at removing them, though that's not always successful and on
> some occasions for good reasons).
I'd vote for having a kernel option to choose between either leaving the
bit (a) enabled, or (b) leaving it disabled and putting a nasty warning
(e.g. WARN_ON_ONCE()) out on the console or (c) printing that warning
and also aborting the task. There are use cases for all of them.
It might be good to have a sysctl control, at least a global one that
turns all instruction emulation off.
> The main argument on this thread is about how far back in the
> architecture roadmap should the arm64 kernel support/emulate. Do we need
> to have a plan in place for eventually removing such emulation (like
> maybe even making the emulation slower and slower)?
The default answer is "as long as anybody is using it". I had the
same idea with making it gradually slower but in reality that isn't
going to help. I think the best option is to make it easy to find
and debug any application that is using deprecated instructions so
people stop relying on them, and encourage distros to turn the emulation
code off as soon as they are ready.
Arnd
next prev parent reply other threads:[~2014-07-03 18:15 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 23:06 Android and compatibility with deprecated armv7 instructions Colin Cross
2014-07-01 23:42 ` Olof Johansson
2014-07-01 23:48 ` Mark Brown
2014-07-02 10:01 ` Will Deacon
2014-07-02 15:48 ` Colin Cross
2014-07-02 16:16 ` Will Deacon
2014-07-02 18:03 ` Christopher Covington
2014-07-02 18:25 ` Will Deacon
2014-07-02 19:47 ` Mark Brown
2014-07-05 21:26 ` Rob Herring
2014-07-02 16:39 ` Mark Brown
2014-07-02 17:01 ` Will Deacon
2014-07-02 17:33 ` Mark Brown
2014-07-02 22:14 ` Grant Likely
2014-07-03 10:41 ` Catalin Marinas
2014-07-03 14:28 ` Arnd Bergmann
2014-07-03 15:00 ` Russell King - ARM Linux
2014-07-03 15:40 ` Grant Likely
2014-07-03 17:13 ` Catalin Marinas
2014-07-03 17:48 ` Russell King - ARM Linux
2014-07-03 18:15 ` Arnd Bergmann [this message]
2014-07-03 18:30 ` Russell King - ARM Linux
2014-07-03 18:37 ` Will Deacon
2014-07-03 18:52 ` Russell King - ARM Linux
2014-07-03 19:00 ` Will Deacon
2014-07-04 8:57 ` Catalin Marinas
2014-07-04 9:25 ` Russell King - ARM Linux
2014-07-04 10:12 ` Arnd Bergmann
2014-07-04 14:09 ` Dr. David Alan Gilbert
2014-07-04 12:56 ` Grant Likely
2014-07-04 13:31 ` Russell King - ARM Linux
2014-07-03 18:46 ` Will Deacon
2014-07-03 18:53 ` Arnd Bergmann
2014-07-03 19:07 ` Russell King - ARM Linux
2014-07-03 19:40 ` Arnd Bergmann
2014-07-04 13:25 ` Grant Likely
2014-07-03 16:22 ` Grant Likely
2014-07-03 17:05 ` Russell King - ARM Linux
2014-07-03 17:32 ` Will Deacon
2014-07-03 18:23 ` Arnd Bergmann
2014-07-03 18:38 ` Peter Maydell
2014-07-03 18:40 ` Will Deacon
2014-07-03 18:32 ` Mark Brown
2014-07-03 22:16 ` Måns Rullgård
2014-07-03 22:47 ` Russell King - ARM Linux
2014-07-04 7:08 ` Ard Biesheuvel
2014-07-04 8:24 ` Catalin Marinas
2014-07-04 8:33 ` Ard Biesheuvel
2014-07-04 9:21 ` Måns Rullgård
2014-07-04 9:34 ` Russell King - ARM Linux
2014-07-04 10:21 ` Måns Rullgård
2014-07-04 10:33 ` Russell King - ARM Linux
2014-07-04 11:00 ` Ard Biesheuvel
2014-07-04 17:28 ` Nicolas Pitre
2014-07-03 17:43 ` Catalin Marinas
2014-07-04 13:22 ` Grant Likely
2014-07-04 19:24 ` Mark Brown
2014-07-04 19:33 ` Arnd Bergmann
2014-07-04 22:06 ` Måns Rullgård
2014-07-04 22:08 ` Mark Brown
2014-07-05 11:14 ` Catalin Marinas
2014-07-05 11:25 ` Russell King - ARM Linux
2014-07-05 16:43 ` Mark Brown
2014-07-05 17:06 ` Catalin Marinas
2014-07-05 18:43 ` Arnd Bergmann
2014-07-05 21:19 ` Catalin Marinas
2014-07-06 15:39 ` Arnd Bergmann
2014-07-07 13:59 ` Janne Grunau
2014-07-07 14:52 ` Catalin Marinas
2014-07-07 17:52 ` Janne Grunau
2014-07-07 15:43 ` Peter Maydell
2014-07-08 5:28 ` Måns Rullgård
2014-07-07 14:35 ` Catalin Marinas
2014-07-07 21:26 ` Arnd Bergmann
2014-07-07 12:28 ` Grant Likely
2014-07-07 18:35 ` Colin Cross
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=4840595.cpHbY6hJKL@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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