Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3000074rwa; Mon, 22 Aug 2022 18:52:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR4nr/POuTMYKfN6ZbRMEcdnhcT5m07BN29qkEzjVDkgM164twDZHWHCrj5O1CNppsJmw3HQ X-Received: by 2002:a17:906:cc58:b0:73d:8980:93a4 with SMTP id mm24-20020a170906cc5800b0073d898093a4mr3463949ejb.737.1661219569549; Mon, 22 Aug 2022 18:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661219569; cv=none; d=google.com; s=arc-20160816; b=hqVi1TZY/rOYrYJ5wpmN3Aen2ug4+hjk2LKswKHNZ/rGuihYQXh964ZuxYHZFfag64 GTTBrN9Ie3WfMXUgGLc2gnFMoe5rXYpyjBAjy6VcL1vGu/qt+HF8x0ESTklfdpb69rlO 50BLxlcQ1WJ6ldw53Pya26cZrtFOvNIK82z+pRXkfOQs1gQ/kqafBymqSNcXK4dWHoR/ pR2cZ86roNomHKLniAJDDAdxSglTOSNVdZGiiqqVDzkVJ7y5vGnslnAfFOB2qRAtbulF LTsYQ4XvDaVMV5u81J5sJjQN3BilEcVRaPBVePmFxWFyPag1cuCpRL+hgWPeNehoHkZ2 mkcw== 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=gKo7Cv2fUdUhEPBXOKdS/DwuvnHrEAegrs+dUBHwR1I=; b=p1zNk0tJQr+V8KFDYjRjw18QdNgH5ybN2uH+KTOJlx/mH4Oqzu/k2Qc1516AUKp2uH OPtkUXRSyAMvj4msiYEW17tc2ZOneefxgTdrZmY0l3ARMupgY6NfpElbPrnvU1c4R2t7 tweBWmKWzAandg6x+4fdEeJWaQgxBS6s1vV+RayG2VmDS57K0cyxwfBTVhiqLQwUjBL1 beXdFlOBl+uQi/LWBFfHWzAhgmhDpBz+iIxCQa1cqz+5pPY/Q4IjvqACOYSW2IaN/CKH ZwVzlx2aThmdU0/SzagklO7NFCT6Z1JZ2ue0lq5owIczGcwZ6vPJEW9qko0aVk52pToF Dfyg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pk9-20020a170906d7a900b00722ebccb11asi8915539ejb.101.2022.08.22.18.52.23; Mon, 22 Aug 2022 18:52:49 -0700 (PDT) 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 S239205AbiHWBs2 (ORCPT + 99 others); Mon, 22 Aug 2022 21:48:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238731AbiHWBsZ (ORCPT ); Mon, 22 Aug 2022 21:48:25 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC7D2DE80 for ; Mon, 22 Aug 2022 18:48:24 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MBX9L6Br3zlVyK; Tue, 23 Aug 2022 09:45:10 +0800 (CST) Received: from dggpemm500015.china.huawei.com (7.185.36.181) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 23 Aug 2022 09:48:23 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500015.china.huawei.com (7.185.36.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 23 Aug 2022 09:48:22 +0800 From: Wang ShaoBo To: CC: , , , , , , Subject: [PATCH] arm64/sme: Clearing TIF_SVE but not TIF_SME in za_set() Date: Tue, 23 Aug 2022 09:56:27 +0800 Message-ID: <20220823015627.4161141-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500015.china.huawei.com (7.185.36.181) 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,T_SCC_BODY_TEXT_LINE 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 Clearing target's TIF_SVE but not current's TIF_SME in za_set(), as it indicates target's SVE storage unavailable. Fixes: 776b4a1cf364 ("arm64/sme: Add ptrace support for ZA") Signed-off-by: Wang ShaoBo --- 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 21da83187a60..66d5c7efb745 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1084,7 +1084,7 @@ static int za_set(struct task_struct *target, if (!target->thread.sve_state) { sve_alloc(target); if (!target->thread.sve_state) { - clear_thread_flag(TIF_SME); + clear_tsk_thread_flag(target, TIF_SVE); ret = -ENOMEM; goto out; } -- 2.25.1