From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27019 invoked by alias); 12 Jun 2019 16:00:45 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 27010 invoked by uid 89); 12 Jun 2019 16:00:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Jun 2019 16:00:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 49B412B; Wed, 12 Jun 2019 09:00:41 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0EA383F73C; Wed, 12 Jun 2019 09:00:39 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: gdb@sourceware.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Will Deacon , Julien Grall , Catalin Marinas , Peter Maydell , Zhang Lei , Alan Hayward Subject: [PATCH v2 0/3] arm64/sve: Fix mutating register endianness on big-endian Date: Wed, 12 Jun 2019 16:00:00 -0000 Message-Id: <1560355234-25516-1-git-send-email-Dave.Martin@arm.com> X-SW-Source: 2019-06/txt/msg00023.txt.bz2 This is a respin of [1], swapping the first two patches so that (new) patch 1 can go to stable stand-alone without depending on patch 2. I've also smuggled in a new trivial patch 3, that just replaces a couple of magic numbers for which there is now a suitable #define to use, which have been bugging me for a while. Original blurb: By inspection while debugging something else, I noticed that the byte order of FPSIMD V-register stores and SVE Z-register stores is not the same when running on big-endian. This is not properly taken into account when moving between the FPSIMD and SVE register views inside the kernel, resulting in the bytes of a V-register getting spontaneously reversed in some situations, from userspace's point of view. The signal frame and ptrace interface are also affected. The KVM ABI forbids mixing the two views and so should not be affected. See patch 2 for details. Patch 1 does some trivial preparatory refactoring. gdb may or may not be affected by this, depending on how it uses the NT_PRFPREG and NT_ARM_SVE regsets. I'll leave it to the developers to assess that. [1] [PATCH 0/2] arm64/sve: Fix mutating register endianness on big-endian http://lists.infradead.org/pipermail/linux-arm-kernel/2019-June/657824.html Dave Martin (3): arm64/sve: Fix missing SVE/FPSIMD endianness conversions arm64/sve: Factor out FPSIMD to SVE state conversion arm64/sve: Fix a couple of magic numbers for the Z-reg count Documentation/arm64/sve.txt | 16 +++++++++++ arch/arm64/include/uapi/asm/kvm.h | 7 +++++ arch/arm64/include/uapi/asm/ptrace.h | 4 +++ arch/arm64/include/uapi/asm/sigcontext.h | 14 +++++++++ arch/arm64/kernel/fpsimd.c | 49 ++++++++++++++++++++++++-------- 5 files changed, 78 insertions(+), 12 deletions(-) -- 2.1.4