Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77A09C31E46 for ; Wed, 12 Jun 2019 16:00:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AEB621019 for ; Wed, 12 Jun 2019 16:00:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JTKLOxWc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AEB621019 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=fhVzK5d65dJiMOF4WqbPKJBmoHVeBDMBecgysh3K6hU=; b=JTK LOxWcph8xI5FDuHyDZbbYPnBTFYnRMEjfGDg5ylfJ/quT2ADepNgY2QmjqKw99TT69h2VR5UgxWnh UjmiiS7oDJFMIH8Jj2yomOtlXyjwmNwgIoruOrJgmQALqDDZovhdFUQEzyCFYzHL4flAohVn8czcR 7vmn8KbcG2Un/QjeUNRw84PQ8eGxRShHZtxCDeE+GESU2aDrqe2o88efgF73wYBZXJe9oSeBhwKuj KwdvkJSte1E/fsaq/BHuBfLTQaRE1FifsE5oQDCIjWuOSZB2mUY/1JMSbLxO1l+a1edVDnA8hWBW/ +ZQMe8cDx/66PhlVoZxF5MOnb/Um31Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb5g5-0007EW-Gw; Wed, 12 Jun 2019 16:00:45 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb5g1-0007Bo-Qw for linux-arm-kernel@lists.infradead.org; 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 Subject: [PATCH v2 0/3] arm64/sve: Fix mutating register endianness on big-endian Date: Wed, 12 Jun 2019 17:00:31 +0100 Message-Id: <1560355234-25516-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_090041_936060_35A1EE89 X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , gdb@sourceware.org, Alan Hayward , Will Deacon , Zhang Lei , Julien Grall , Catalin Marinas , =?UTF-8?q?Alex=20Benn=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel