Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3179311rdg; Tue, 17 Oct 2023 07:03:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8rG4WEK8OSKuKGDc9ar2yD/sd3Z3MvSWPWtkxq/USp1oYJOL9mdGH36rvznRrP59ybBNn X-Received: by 2002:a17:903:41c7:b0:1c1:d4f4:cd3c with SMTP id u7-20020a17090341c700b001c1d4f4cd3cmr2784564ple.31.1697551432019; Tue, 17 Oct 2023 07:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697551432; cv=none; d=google.com; s=arc-20160816; b=IKsYrBuJnMxxmIFH682R7hEZqmiaWL7VYBjY4H3SBM1jigT05Gq2BNMDpJVvLOg5j0 YhhqUPvVRLG1ehIsfrKGrZP03Tq9LNTqCTk9C6gkS1tKfutvBuB/sBDPn7hSpRAMYAwy 75z7elRfn5CpswI3f5dvlKV6WBvO+7PREsZR6SDdrvdaPN/f67zYPQp9lcLOxwZWrRmU svUb+hz/urbdHrNAVjhZyEmlWz4QvG/C2byc4dt1/1wgIodzDTjcEmqXxCJFUysnTYe3 z+PB7qEx83ooTH+XjCwedwAO14iG8//QeH9a+VB5R4Vq/pys9RSo1eY6iVeuJVB5xCtD SAGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2EkbdhuUUpxlvSds13A+xwGsEo8MQ5Q9SzkjS22ZRVc=; fh=oI3p1wF0aZbJCxnB9pFWVBxq/eD2Ayb+my+RoBdq/eY=; b=SNdNMsQHkjsgEyCJ6csfnrGjuguPRSdNWSQAN5tt/lH86soplw0xonqilSssTtBJ80 fCGDkMj4IWKgPB3ZUGsjUpkawZJbTbFzCNsmnJE5eLIhc4iuHWvDKpOfPidAm/3B/zOv eKP4yHvX1/n7ea7mjUG/LIpjAfB8Ds5XnC/sg6AmCMZ0Mc/oaf0Tt/J07FFN4bItZsyI 3gOiTSrvAEMEMJFFr7hvKJ0zRvV0Q6Z1NcWqSKfMCza7J6syTS0ceqAevpYPW6HzW3+d LStpkY0wouWXnztdj1HhgV0tHo39yJRZySj9GsDdZlBF/iDitK1qDVlaqYBh69pfn4uf hRaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cpavnQq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w15-20020a1709027b8f00b001b878f9e11csi1769055pll.54.2023.10.17.07.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 07:03:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cpavnQq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A95C9801CCFF; Tue, 17 Oct 2023 07:03:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343900AbjJQODi (ORCPT + 99 others); Tue, 17 Oct 2023 10:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343675AbjJQODf (ORCPT ); Tue, 17 Oct 2023 10:03:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F610F5; Tue, 17 Oct 2023 07:03:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEF4DC433C9; Tue, 17 Oct 2023 14:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697551412; bh=2RVI5unbkvVvHNVKtdp3DCbxXfoaBxvBCnrwaiQJnEQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cpavnQq/MPo+pRHK9jljG3aSapy1YrAdo4fsHCIi6p9j0Abu+wjfv+1s7Ubb4zo/p emRJzomSM8xjNOvcBjk2YwyyEbFEa0ZSFneEVQf/susg2FIFDBOwY48WEokjxjO6tQ W4b+4BJYfZ7Yv8xMBLa111npbFLXnnXBr2aZTdY6RbLezHxJZ8ieQZPwdzDv3sGb+B P0srpgPZOnrbM1ZxbpVWXDwX+yQNIpMSlxz1G83huCFGtN3cZHWGQk6AwXaIhXHU8z cRqnNmvQ9+5M/fJlQiHMJa78ykdbIwmAHq9k9f9g2e7WWzpsfPGKejhozMy3By1DaE mlRTqtdiZmAxw== Date: Tue, 17 Oct 2023 15:03:24 +0100 From: Mark Brown To: Mark Rutland Cc: Naresh Kamboju , Linux ARM , open list , lkft-triage@lists.linaro.org, linux-stable , Greg Kroah-Hartman , Catalin Marinas , Steven Rostedt , Masami Hiramatsu , Marc Zyngier Subject: Re: selftests: ftrace: Internal error: Oops: sve_save_state Message-ID: <39b003bc-df89-4e0b-929e-2c42354aaa86@sirena.org.uk> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rPnpHSvbtDULm9wM" Content-Disposition: inline In-Reply-To: X-Cookie: Santa Claus is watching! X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 07:03:49 -0700 (PDT) --rPnpHSvbtDULm9wM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 17, 2023 at 02:42:01PM +0100, Mark Rutland wrote: > So unless sve_alloc() failed, at the instant the IRQ was taken: > * `task->thread.sve_state` should be non-NULL > * `task->thread_info.flags & TIF_SVE` should be 0 > ... so if `task->thread.sve_state` becomes NULL, I wonder if we end up > accidentally blatting that as part of the context switch? I can't immedaitely > see how/ We're possibly missing a fpsimd_bind_task_to_cpu() somewhere since all the hilarity with KVM means that we don't use the task_struct to save state, though the task that's taking the SVE trap shouldn't be impacted there if it didn't set TIF_SVE yet. There *is* a window where we have TIF_SVE set but didn't yet do the rebind but that should be in a preempt disabled section. --rPnpHSvbtDULm9wM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmUulCsACgkQJNaLcl1U h9CDrwf9F5vaNDd43zZltxM9I4iAWUwV9jTzBwFgYdJJYE7zCJi/jFFpka6sO9PS TdCruypGFw/39o5A3Mblh6BlMiWRg+2qV/I9XcZBI8EITUFc9s/HsMF2SrcV9HWH n41FheFZQLVmuWQHRsqUdGJOpLSSk8HZV8VUvh0MoR1KNmYzosdK1ZOR3DxPgaDr PTar2ZaiaS3xc+EBMTfBBHExnUKKY6ASrMPHO61o82lVIFx8JGw49IGbiKAwEvpY Bt9vnUiPQKISnKoDGpuUZC0TbTVtzoa/crdXcHJpCHTd7evZe2t6TyXOISc3kdBe 5coGUVzldurIxR14J48phXawZwmsOw== =beHi -----END PGP SIGNATURE----- --rPnpHSvbtDULm9wM--