Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1343057 > unrolled thread

[PATCH v2 0/8] arm64: Support for systems without AArch32 state

Started bySuzuki K Poulose <suzuki.poulose@arm.com>
First post2016-02-25 11:00 +0100
Last post2016-03-02 16:30 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/8] arm64: Support for systems without AArch32 state Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-02-25 11:00 +0100
    Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state Yury Norov <ynorov@caviumnetworks.com> - 2016-03-01 22:30 +0100
      Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state Yury Norov <ynorov@caviumnetworks.com> - 2016-03-02 16:10 +0100
        Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state Mark Rutland <mark.rutland@arm.com> - 2016-03-02 16:30 +0100
        Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-03-02 16:30 +0100

#1343057 — [PATCH v2 0/8] arm64: Support for systems without AArch32 state

FromSuzuki K Poulose <suzuki.poulose@arm.com>
Date2016-02-25 11:00 +0100
Subject[PATCH v2 0/8] arm64: Support for systems without AArch32 state
Message-ID<r60Se-1Sg-13@gated-at.bofh.it>
This series add checks to make sure that the AArch32 state is
supported before we process the 32bit ID registers. Also
checks the same for COMPAT binary execution.

(Painfully) applies on top of 4.5-rc5 + [1] + [2].

Or it is available here :
  git://linux-arm.org/linux-skp.git noaarch32/v2-4.5-rc5

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/410556.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401913.html

Changes since V1:
  - Prevent changing the personality to PER_LINUX32 by adding
    wrapper for personality() syscall.
  - Add the check to KVM before initialising a AArch32 vcpu
  - Tested on hardware.

Btw, linux32 doesn't complain when the personality() syscall fails to change
to PER_LINUX32. You can verify the personality by running 
 $ cat /proc/cpuinfo
 which would still list the 64bit features for the CPUs.


Suzuki K Poulose (7):
  arm64: hwcaps: Cleanup naming
  arm64: HWCAP: Split COMPAT HWCAP table entries
  arm64: Add helpers for detecting AArch32 support at EL0
  arm64: cpufeature: Check availability of AArch32
  arm64: cpufeature: Track 32bit EL0 support
  arm64: Add a wrapper for personality() syscall
  arm64: kvm: Check support for AArch32 for 32bit guests

Yury Norov (1):
  arm64: compat: Check for AArch32 state

 arch/arm/include/asm/kvm_host.h     |    5 +
 arch/arm/kvm/arm.c                  |    3 +
 arch/arm64/include/asm/cpufeature.h |   15 ++-
 arch/arm64/include/asm/elf.h        |    3 +-
 arch/arm64/include/asm/kvm_host.h   |    8 ++
 arch/arm64/include/asm/sysreg.h     |    1 +
 arch/arm64/kernel/cpufeature.c      |  184 +++++++++++++++++++++--------------
 arch/arm64/kernel/cpuinfo.c         |   37 +++----
 arch/arm64/kernel/sys.c             |   10 ++
 9 files changed, 173 insertions(+), 93 deletions(-)

-- 
1.7.9.5

[toc] | [next] | [standalone]


#1347029

FromYury Norov <ynorov@caviumnetworks.com>
Date2016-03-01 22:30 +0100
Message-ID<r801I-6o3-11@gated-at.bofh.it>
In reply to#1343057
On Thu, Feb 25, 2016 at 09:52:40AM +0000, Suzuki K Poulose wrote:
> This series add checks to make sure that the AArch32 state is
> supported before we process the 32bit ID registers. Also
> checks the same for COMPAT binary execution.
> 
> (Painfully) applies on top of 4.5-rc5 + [1] + [2].
> 
> Or it is available here :
>   git://linux-arm.org/linux-skp.git noaarch32/v2-4.5-rc5
> 
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/410556.html
> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401913.html
> 
> Changes since V1:
>   - Prevent changing the personality to PER_LINUX32 by adding
>     wrapper for personality() syscall.
>   - Add the check to KVM before initialising a AArch32 vcpu
>   - Tested on hardware.
> 
> Btw, linux32 doesn't complain when the personality() syscall fails to change
> to PER_LINUX32. You can verify the personality by running 
>  $ cat /proc/cpuinfo
>  which would still list the 64bit features for the CPUs.

Hi Suzuki,

I have some troubles with access to appropriate hardware to test
it, but I didn't forget.

Yury.

[toc] | [prev] | [next] | [standalone]


#1348112

FromYury Norov <ynorov@caviumnetworks.com>
Date2016-03-02 16:10 +0100
Message-ID<r8gzv-UO-3@gated-at.bofh.it>
In reply to#1347029
On Wed, Mar 02, 2016 at 12:19:23AM +0300, Yury Norov wrote:
> On Thu, Feb 25, 2016 at 09:52:40AM +0000, Suzuki K Poulose wrote:
> > This series add checks to make sure that the AArch32 state is
> > supported before we process the 32bit ID registers. Also
> > checks the same for COMPAT binary execution.
> > 
> > (Painfully) applies on top of 4.5-rc5 + [1] + [2].
> > 
> > Or it is available here :
> >   git://linux-arm.org/linux-skp.git noaarch32/v2-4.5-rc5
> > 
> > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/410556.html
> > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401913.html
> > 
> > Changes since V1:
> >   - Prevent changing the personality to PER_LINUX32 by adding
> >     wrapper for personality() syscall.
> >   - Add the check to KVM before initialising a AArch32 vcpu
> >   - Tested on hardware.
> > 
> > Btw, linux32 doesn't complain when the personality() syscall fails to change
> > to PER_LINUX32. You can verify the personality by running 
> >  $ cat /proc/cpuinfo
> >  which would still list the 64bit features for the CPUs.
> 
> Hi Suzuki,
> 
> I have some troubles with access to appropriate hardware to test
> it, but I didn't forget.
> 
> Yury.

Hi Suzuki,

ubuntu@arm64:~$ uname -a
Linux arm64 4.5.0-rc5-00019-g3e330b9 #76 SMP PREEMPT Wed Mar 2 17:46:57 MSK 2016 aarch64 aarch64 aarch64 GNU/Linux

ubuntu@arm64:~$ cat /proc/cpuinfo
processor       : 0-47
BogoMIPS        : 200.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0x0a1
CPU revision    : 0

ubuntu@arm64:~$ file readdir
readdir: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 2.6.32,
BuildID[sha1]=aeebc12494450b55a2ab0d39ebd2e121e9085d5c, not stripped

W/o 32_EL0:
ubuntu@arm64:~$ ./readdir 
-bash: ./readdir: cannot execute binary file: Exec format error

With 32_ELO but w/o your patchset: kernel just hangs (on 4.2 it
printed errors, but it was other machine);

With 32_EL0 and with your patchset:
ubuntu@arm64:~$ ./readdir 
-bash: ./readdir: cannot execute binary file: Exec format error

So, everything is looking OK. 

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

Yury.

[toc] | [prev] | [next] | [standalone]


#1348153

FromMark Rutland <mark.rutland@arm.com>
Date2016-03-02 16:30 +0100
Message-ID<r8gST-14i-35@gated-at.bofh.it>
In reply to#1348112
On Wed, Mar 02, 2016 at 06:07:21PM +0300, Yury Norov wrote:
> ubuntu@arm64:~$ uname -a
> Linux arm64 4.5.0-rc5-00019-g3e330b9 #76 SMP PREEMPT Wed Mar 2 17:46:57 MSK 2016 aarch64 aarch64 aarch64 GNU/Linux
> 
> ubuntu@arm64:~$ cat /proc/cpuinfo
> processor       : 0-47
> BogoMIPS        : 200.00
> Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
> CPU implementer : 0x43
> CPU architecture: 8
> CPU variant     : 0x1
> CPU part        : 0x0a1
> CPU revision    : 0

As an aside, please do not hack up custom /proc/cpuinfo formats.

It is a compatibility nightmare for everyone.

Mark.

[toc] | [prev] | [next] | [standalone]


#1348155

From"Suzuki K. Poulose" <Suzuki.Poulose@arm.com>
Date2016-03-02 16:30 +0100
Message-ID<r8gST-14i-37@gated-at.bofh.it>
In reply to#1348112
On 02/03/16 15:07, Yury Norov wrote:
> On Wed, Mar 02, 2016 at 12:19:23AM +0300, Yury Norov wrote:
>> On Thu, Feb 25, 2016 at 09:52:40AM +0000, Suzuki K Poulose wrote:
>>> This series add checks to make sure that the AArch32 state is
>>> supported before we process the 32bit ID registers. Also
>>> checks the same for COMPAT binary execution.

...

>
> So, everything is looking OK.
>
> Tested-by: Yury Norov <ynorov@caviumnetworks.com>

Thanks Yury.

Suzuki

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web