Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 88FAFECAAA1 for ; Mon, 31 Oct 2022 20:41:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=9FIRwacUxHrus+7mqED/ah2dyg2CAcOMsutoi38k2mw=; b=dpjhfV9PQf2U63 ZUMJHQBisPZe3qQfPf/61qnY+owxF+AaSIP8cHH+7qgdrpTbbx4N4/yvzrQ6H0pt7V64pNJVJCbiA aKJN+yDWFQvgjMVO+qTCx253Csdivc/7pW853nCaBDohTC6yV7i+szY7geqLJ/mC1qtJLTTK3/AP6 uduBGuykTbcju7A63xxsJZqE1PDPJEZ2FCddjDubtmhtBQwt6CW6qZW5eOZHCIgODAoIxkHczL8Vr VceC9EqUEag0KPJEgyWCwjwORlN8LJJ5eWoHpS7LZbyRuWuWncyffgetP7Q3EFSVm4GrxdC1jGbQn RDxOqJBRV/FhAgMzcSpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opbZu-00FFwW-Hj; Mon, 31 Oct 2022 20:40:14 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opbZq-00FFvr-Vu for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 20:40:12 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B65CBB81A61; Mon, 31 Oct 2022 20:40:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 951D0C433D6; Mon, 31 Oct 2022 20:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667248807; bh=dxQkqLq3j2DgpeN3sEQQGkvsODrMANnDp2HMUnDwvTU=; h=From:To:Cc:Subject:Date:From; b=Jsn7EUARYelf9fmSyij0iZimjQ+VKZDMeW3sV2RifOmQm3NE1AaA8OW1ohtNTrThs F4vwuNE4OiNNCm6aSzoznH+bRpkK9qM04Dv3nd94cKMGo1MD1Bg5yo+5Ednn0oGKva i0mz+BxhNqjzUctivshZ91cH8Dtqqlv4QSTGXwdpokXEyn2rZxijv5OA4LZdOkJ+0A YHAA3OOJYnanIKNKMRWSN1T4ELFcDg8/DsKdz0dG0+YfnRpyD+mtA2/ND6R2GNGggy UpckpeVfZwKWYNVhcDXNfz2LTh9TAeUOXhcRP3YC1AxF9eUn/aQvWWjPdhjB+NCbLq lZApXu7EaluGw== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v2 0/4] arm64/signal: Support TPIDR2 Date: Mon, 31 Oct 2022 20:17:32 +0000 Message-Id: <20221031201736.894374-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1623; i=broonie@kernel.org; h=from:subject; bh=dxQkqLq3j2DgpeN3sEQQGkvsODrMANnDp2HMUnDwvTU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjYC1clvk3xBkJroKPCfKcVHIiix/tVa2fRhp9/Rdd x+22XxiJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY2AtXAAKCRAk1otyXVSH0GjTB/ 9NRboVXK66SfsDa8Y8jMBvcK9UCD1eiAl6M2JosQDBwSne5EqgDiFCbexjzGfDUn5zvMvOVHb6+Rno eTtNKM4cLbA/3udmcQRLIB+udjU96T+qqErdAN697RTXoMc+0BqbPBTPkIAsdlc9S0Zyy1NiTPRxoy yx3n8wdJPuysP9M13I0A1cjyRMldFuvHCMSeOmy7gQf9EMIsQpIwb9C0YEC+gYO0FU2WDqu0Mi9VZT zwU9pVpOHted8h3mgbBvJDRQkdkqhpvSbMIdK/olOIDMwdukZ93UwhH1SZnK1xPiItIwG1RwTud07z /qaiDuNnzYn5yAu/Dwquf60LOQfPk7 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_134011_213014_DC0C2116 X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When SME support was merged support for TPIDR2 in signal frames was omitted, meaning that it was not possible for signal handers to inspect or modify it. This will present an issue for programs using signals to implement lightweight threads so let's provide access to TPIDR2 in signal handlers. Implement a new record type for TPIDR2 using the same format as we use for ESR and add coverage to make sure that this appears in the signal context as expected. Due to TPIDR2 being reserved for libc we only validate that the value is unchanged, meaning we're likely to just be validating the default value of 0 on current systems. I have tested with a modified version that sets an explicit value. v2: - Rebase onto v6.1-rc3. - Change the signal frame magic to 0x54504902 (TPI). Mark Brown (4): arm64/sme: Document ABI for TPIDR2 signal information arm64/signal: Include TPIDR2 in the signal context kselftest/arm64: Add TPIDR2 to the set of known signal context records kselftest/arm64: Add test case for TPIDR2 signal frame records Documentation/arm64/sme.rst | 3 + arch/arm64/include/uapi/asm/sigcontext.h | 8 ++ arch/arm64/kernel/signal.c | 59 ++++++++++++ .../testing/selftests/arm64/signal/.gitignore | 1 + .../arm64/signal/testcases/testcases.c | 4 + .../arm64/signal/testcases/tpidr2_siginfo.c | 90 +++++++++++++++++++ 6 files changed, 165 insertions(+) create mode 100644 tools/testing/selftests/arm64/signal/testcases/tpidr2_siginfo.c base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763 -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel