Received: by 2002:a05:7412:a9a8:b0:f9:92ae:e617 with SMTP id o40csp85109rdh; Wed, 20 Dec 2023 17:06:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7/woD0dbkvzklryH4S8IawT7eijULGBAEWbz6g1jS30TADIOZjU4szEgvdH08GTouGHrk X-Received: by 2002:a05:620a:6881:b0:77d:51b3:208b with SMTP id rv1-20020a05620a688100b0077d51b3208bmr29003336qkn.4.1703120804077; Wed, 20 Dec 2023 17:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703120804; cv=none; d=google.com; s=arc-20160816; b=JI1Qwl/ftTy8+p4tw5BLF3OE2+RDrt6PcYNemsNt29FD95flsv+mQnVu04YG+yKYUW OocvpUosnft/nkV1CIw2Ve8e6FVInTZuFRD3eKwaxQ8FOSGKj8FIn6nLiekHTJl8dh1m EmdhOddDHVUYnpSsE+NuiXjWXCLT8+AQy10L++tH2M03sqHUNuNzq8BFMoQao1IL7hTz TGKk9u7zuOvDmwF/kAlbN7D4rHaAwyxcLJKA7oNbXJnRvB0uvWwVZg9NvzhEno1kUzNW 73ZbjE1treuC2B4TTcDoYeeFaeDHxLG6USihF9t9HgQSk0HC4Nf3aAXjSgaUPY4amjGV Vxhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/haLz2MEeW9HIwvJVhXpucekoSzEWnklXYRr0l/5z4s=; fh=bricco8bhwV/+YRa5WK6XZoOuZhW/dAhsfMPSpUIjxE=; b=D+61BFOtHExgmgiyzFh71Pk810t3i6F3ghR6px3u8ZO10/TpmUDHhp3cQRaCEkyWwC VBDQPO17BZGRWRp02tt78VDC+RFJWHZ2GcLjYM7SfNi1v0v1FPgm5U0XWNwJx4GLar3E CYdRwchizqykO0bbgiIyNIquC0BND3NmI0Zfb4fLZPYAlkZ+g3YX0htpssv+8mcO1ccO i+GE5bLxwOvLZE/N4qHxFVZD9DbofdbvAmXVbV1zNw9BWzSzjBlpYqjDxLG5NbheY4Vi KAI3k/J2FUx93iW00pD/9Ky18/Tonca5DEKpJzUAkLZ4dq2X3Tw7JeH5RjVRyRGreVRO x4hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=opmQblqy; spf=pass (google.com: domain of linux-kernel+bounces-7714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o19-20020a05620a111300b00779d0a62e5fsi1011743qkk.660.2023.12.20.17.06.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 17:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=opmQblqy; spf=pass (google.com: domain of linux-kernel+bounces-7714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C9BD61C227FD for ; Thu, 21 Dec 2023 01:06:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DA3217E9; Thu, 21 Dec 2023 01:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="opmQblqy" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9E112567; Thu, 21 Dec 2023 01:06:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEAFAC433C7; Thu, 21 Dec 2023 01:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703120794; bh=3q/je4lxiM88lpvgaF61zSPIgyprdo8v2CPqjz3q1IY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=opmQblqy1kblwTnTrw2H8sT3BN2wFlHh04CUp8N15C2cC233vLrCT8WAeW7yj8Esp 0i9BVNrC1itAe3TiB8nYnjRs9WtaGYBCGuD91AjLYybX3o6AkaZzZ8F11jAG6dSK2X WYQLGuEi7FkbKBwxfu98I5LUmmf6c6P9mW4HdnZkJyCjlzo13nP5+0LvoAdEOqgIts q0KBCL4+4BiMPtgz38OHRNfj/mRtIyHrmDbCDkzeDWfXWx1Nc1yDtZN5/5Wpv89fMo TWn8oT+mrc0SKYfoFkROhvA0Gvjb37kDbdysQrWbpaHv5LnK75UoV3QvZl3CJL9K7K QXQIdT28O3sjQ== Date: Thu, 21 Dec 2023 01:06:28 +0000 From: Mark Brown To: Daniel =?iso-8859-1?Q?D=EDaz?= 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: References: <63e92a6a-9cb7-4272-b524-ccaf997aceb3@sirena.org.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gWCBnsT00SOVLyLa" Content-Disposition: inline In-Reply-To: X-Cookie: bug, n: --gWCBnsT00SOVLyLa Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 20, 2023 at 06:06:53PM -0600, Daniel D=EDaz wrote: > We have been seeing this problem in other instances, specifically on > the following kernels: > * 5.15.132, 5.15.134-rc1, 5.15.135, 5.15.136-rc1, 5.15.142, 5.15.145-rc1 > * 6.1.42, 6.1.43, 6.1.51-rc1, 6.1.56-rc1, 6.1.59-rc1, 6.1.63 > * 6.3.10, 6.3.11 > * 6.4.7 > * 6.5.2, 6.5.10-rc2 This is a huge range of kernels with some substantial reworkings of the FP code, and I do note that v5.15 appears to have backported only one change there (an incidental one related to ESR handling). This makes me think this is likely to be something that's been sitting there for a very long time and is unrelated to those versions and any changes that went into them. I see you're still testing back to v4.19 which suggests an issue introduced between v5.10 and v5.15, my change cccb78ce89c45a4 ("arm64/sve: Rework SVE access trap to convert state in registers") does jump out there though I don't immediately see what the issue would be. Looking at the list of versions you've posted the earliest is from the very end of June with others in July, was there something that changed in your test environment in broadly that time? I see that the=20 logs you and Naresh posted are both using a Debian 12/Bookworm based root filesystem and that was released a couple of weeks before this started appearing, Bookworm introduced glibc usage of SVE which makes usage much more common. Is this perhaps tied to you upgrading your root filesystems to Bookworm or were you tracking testing before then? > Most recent case is for the current 5.15 RC. Decoded stack trace is here: > -----8<----- > <4>[ 29.297166] ------------[ cut here ]------------ > <4>[ 29.298039] WARNING: CPU: 1 PID: 220 at > arch/arm64/kernel/fpsimd.c:950 do_sve_acc > (/builds/linux/arch/arm64/kernel/fpsimd.c:950 (discriminator 1)) That's an assert that we shouldn't take a SVE trap when SVE is alreadly enabled for the thread. The backtrace Naresh originally supplied was a NULL pointer dereference attempting to save SVE state=20 (indicating that we think we're trying to save SVE state but don't have any storage allocated for it) during thread switch. It's very plausible that the two are the same underlying issue but it's also not 100% a given. Can you double check exactly how similar the various issues you are seeing are please? I have coincidentally been chasing some other stuff in the past week or two which might potentially be different manifestations of the same underlying issue with current code, broadly in the area of the register state and task state getting out of sync. --gWCBnsT00SOVLyLa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmWDj5MACgkQJNaLcl1U h9D8yQf+O6aLYXO+eqsG/uShuVW2abRfdRrSWdr4CR8ZhbRnWwgeiNGH89O0lF1Z U8uswFHmqnDkFV3peRN0jmsU/TlxwaO45LRUT0s/puEYMnLkaCEfTVfYahbs/6c7 DFO5/sNcBxO1/GaFrItZdOhJm9YIwbXsCAlPDIh2laOj4kpI6C/mO+rb4nFxyFJ4 1B0y4PBfT7kO+wP6sYKXfn76fGi5jgONmsV696UcPTfJFyQUfvFmgDWB6SM1xWr0 8n/62TCUwfxSgsnFVyvPJ+b2r5wObp3sV84nYHRPxom7WtXpwU9g6+t1At2UuRNV g4aIscLDEL8j4Bifd7OpoyBVlnAvFQ== =muue -----END PGP SIGNATURE----- --gWCBnsT00SOVLyLa--