Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2548993rwo; Thu, 3 Aug 2023 11:00:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdGVy/GpgaPNSqulsXHYwCj+Xk/gq8M2VMCeVc3DI+A4PCvhntaN8h8d08ZfolaRd/CO9d X-Received: by 2002:a19:430e:0:b0:4fb:76f7:fde9 with SMTP id q14-20020a19430e000000b004fb76f7fde9mr6916638lfa.30.1691085629798; Thu, 03 Aug 2023 11:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691085629; cv=none; d=google.com; s=arc-20160816; b=dcuZcHa4ZN10+RhFjwt4nkieUCpMWN/8thzJtlyTG3R1Lr2ZEmStL99cElrTT/5FFQ FU16bBOHKnEw1789hXLiMm6tyaf3LM/gqHE72aM9kMiBXr7+g3XrZkpyfCAGLIXEspUu AMKwUGqZCm9IOMDSZ7ebPMWY8pW9idChO2FlBmAlfJBY58Yn3xaYFHsOE4Ptc0oNfkoQ SVeASlUrtBQvW2/+XKRuCmPmlkWOJbqRqPkDRUz+tYU5ZDJ7GrlDQxft1DArfrFjtaNY kwPxRAYu598n9evZ2V4dYupgvoGjctpJX8oYDWaNIm4tWvjn9SWtrn7PhBW3aC4jg7pE UUtA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NuL/jywP1UBefoBkSHaGaRmFAwjcx91VrHx9f8Hl8pE=; fh=MKfzsoFQrNQj010mX0uljEcRh5b/x1FpsUAZcMLADvc=; b=r1sImybEVf0jrN4lmaEcBoHqA25sm2vqwijvzmypEK+AXX4yMPYc8wxzcw9Dqwi/KQ 9aH+J63pdLRX2pTcAr6aDTATIiH0OqaWPPfym0amf6Of84MFgHJaTVPfE5BAo+CWNPec 6xMtlc+HeNz9dFs9gV8d8WZikU2l87Kg1GAaf6xHrgGwiWr2cLUfxkhzQxPwfmL5BUlz P2gXJ9QFdB5EVmKIlIpZ9EXTsvvC2Ck6svZ229wQpiuh8SAtOdnpBwVRLNst/6YR/n1z 8JvyGdm8U9DsZLMrvgzCN14rf4JNaXyC4jc2a9mVoJiqvkrYQFDildmT8YO8Z6mlpZZg z2zA== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020aa7dbc4000000b0052310bfc381si145159edt.288.2023.08.03.11.00.03; Thu, 03 Aug 2023 11:00:29 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234105AbjHCR2l (ORCPT + 99 others); Thu, 3 Aug 2023 13:28:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233865AbjHCR2j (ORCPT ); Thu, 3 Aug 2023 13:28:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525253C0A; Thu, 3 Aug 2023 10:28:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A9D1C61E57; Thu, 3 Aug 2023 17:28:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B584CC433C7; Thu, 3 Aug 2023 17:28:07 +0000 (UTC) From: Catalin Marinas To: Will Deacon , Mark Brown Cc: David Spickett , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] arm64/fpsimd: Clear SME state in the target task when setting the VL Date: Thu, 3 Aug 2023 18:28:05 +0100 Message-Id: <169108367979.2495938.18347411845620974052.b4-ty@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803-arm64-fix-ptrace-tif-sme-v1-1-88312fd6fbfd@kernel.org> References: <20230803-arm64-fix-ptrace-tif-sme-v1-1-88312fd6fbfd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, 03 Aug 2023 00:46:39 +0100, Mark Brown wrote: > When setting SME vector lengths we clear TIF_SME to reenable SME traps, > doing a reallocation of the backing storage on next use. We do this using > clear_thread_flag() which operates on the current thread, meaning that when > setting the vector length via ptrace we may both not force traps for the > target task and force a spurious flush of any SME state that the tracing > task may have. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arm64/fpsimd: Clear SME state in the target task when setting the VL https://git.kernel.org/arm64/c/c9bb40b7f786 -- Catalin