From patchwork Wed Dec 14 13:59:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zenghui Yu X-Patchwork-Id: 33215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp238748wrn; Wed, 14 Dec 2022 06:05:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tKh5SR9IXD0s6Pl0Xy6QkoH4APDXLWvdu1hoEwlgqz06F8ynmGX/O78mg1u/GJPqSIDLT X-Received: by 2002:a05:6512:3992:b0:4a4:68b7:dec3 with SMTP id j18-20020a056512399200b004a468b7dec3mr8715672lfu.31.1671026751187; Wed, 14 Dec 2022 06:05:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671026751; cv=none; d=google.com; s=arc-20160816; b=fzo4eSf2oz+5P8fPPG9M1rRyW5jExCQiYH2WtEEZoN0w+KyPXmionteT8keuvM8URd dWG83fg32axyi3ot0/WtUnWx39VNm2xAvSminZzoNWxrVTkm4UX/GxbSUfi6i6tB4zJf YzukcjYfAjsdhe9zgScSlEVBfMYwZc7cDxlfE6pp29jF3iQ2BLL9tynFab8hzKv88SFC K8N87Ej9198wt2Ae+pqcYQOciimbiwyE1DWy8Dd+A3dKftjvYjEGBAz28V25JGDLhb+c hLkAJSm1FOgSasOBTAITvXMRAM3HRKIDcbgDNtdFmRf8FTOUGnvIgSnP69MJ5qrrLwin P33g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=WkR2q7MfP/uKe0VgdA6odw00t0SucTKoHUBwlrkNEgQ=; b=z8P0RRE3lG0Vqy2JJ5xXfQnurcRr7EIc+0EvVbIFem/ixSNfJDhGui+fx++vIXIf2Y eECORXzuuATMB87HpIMIOfdoKJyL0S1Qnmd9c6sV4K0opHrL7qb+hM2qbhM4gPVSWRvf sYdKIjHx/wNplL0LvvB6i8dReBhCMoqAcV9PlfNyaid7fEQOFahobK06Nn/PgL9JWZC6 hZIcmFI/yfk2VLj4/BBMBHzM1Uq5z/kM1UfIHQ+qvGfvcUvT2n7wcslHBrYLCyf6DxRm FPH2AtfYnBn84SkQz5r8+TqTC8qdHINz8lCJ7QfMSagOLxj0E1xoB15M/bLQlWDfWkfv H7PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb13-20020a170907160d00b007c16e4d5e9esi8588572ejc.412.2022.12.14.06.05.22; Wed, 14 Dec 2022 06:05:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238505AbiLNN77 (ORCPT + 99 others); Wed, 14 Dec 2022 08:59:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238310AbiLNN75 (ORCPT ); Wed, 14 Dec 2022 08:59:57 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AF620188 for ; Wed, 14 Dec 2022 05:59:56 -0800 (PST) Received: from kwepemm600007.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NXH203gzDzqT81; Wed, 14 Dec 2022 21:55:36 +0800 (CST) Received: from DESKTOP-8RFUVS3.china.huawei.com (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 14 Dec 2022 21:59:53 +0800 From: Zenghui Yu To: , CC: , , , , , , , Zenghui Yu Subject: [PATCH] arm64: ptrace: Use ARM64_SME to guard the SME register enumerations Date: Wed, 14 Dec 2022 21:59:43 +0800 Message-ID: <20221214135943.379-1-yuzenghui@huawei.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752198546733624094?= X-GMAIL-MSGID: =?utf-8?q?1752198546733624094?= We currently guard REGSET_{SSVE, ZA} using ARM64_SVE for no good reason. Both enumerations would be pointless without ARM64_SME and create two empty entries in aarch64_regsets[] which would then become part of a process's native regset view (they should be ignored though). Switch to use ARM64_SME instead. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Zenghui Yu Reviewed-by: Mark Brown --- arch/arm64/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 2686ab157601..0c321ad23cd3 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1357,7 +1357,7 @@ enum aarch64_regset { #ifdef CONFIG_ARM64_SVE REGSET_SVE, #endif -#ifdef CONFIG_ARM64_SVE +#ifdef CONFIG_ARM64_SME REGSET_SSVE, REGSET_ZA, #endif