Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp293944rdh; Wed, 7 Feb 2024 05:11:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHseHLJObJ+f2dLb3pS1OWd/ZxIXjeZPzNmLCAcVjcZq23W4dTJ0QR9aol0R2xyrlDC0R84 X-Received: by 2002:a2e:8915:0:b0:2d0:a1f3:dce4 with SMTP id d21-20020a2e8915000000b002d0a1f3dce4mr4248496lji.19.1707311500289; Wed, 07 Feb 2024 05:11:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311500; cv=pass; d=google.com; s=arc-20160816; b=A5cVywaFn+6gpQ/X+4SdBpr+6QgMKbKWLMP5Hmnq9OPwYHGqNKxf9kLzQgEehPm5Ot C2VnO9vWlk0cJ319XInyVjPWYSm4torhq4OajGHWrRj8TGkT+mVu3ZlcssTl4BC+UBxl +lHWh6tWTwv0BrircUJOzmqGWjAOsp2He9p8bTLB9Xxs9pqOW+dOXVi3MExBiVL8JXqS J+UGlTjKlStS93cNM+2lgS9Av008+zcYNRypchen/w4k/pPhFcWSrUFKIdNHT4JlzitJ iRelN46SMnal3n7hl256IWv3kQKzg87QlRfm3+TXo3+I4kIlTy3klS5vwXIdeFwkdzFg NJ8A== ARC-Message-Signature: i=2; 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=NQOiG7pnw+52xacmz9GjkOBY4p7budGW+kFCBzPAxyA=; fh=ZyQj3YAaDKObcniVQL3odKk7paxAKUtZ8INpxu5ReXE=; b=q458k0zJZrKRaC/awomdxYXl1IEwAiktI2foUw10qoYV46PL4tO38U2ATYTSl36fET s3NBAvE/M6raBiCVNtPJj68vMObxW4WxjkRKXHOvcj5lR+0KJJOaLLducrWArnHmpw6z OcRH7svG6okOrBMgCIQAqWBHE48OAV5+VYefD5doMR1SXRInLL059F2mT24wskw3jdTa 9hT1p0oRC1l+VV7wh8wJIxAythN+vXo3XywLKjyrTGJ1M13IErJQyfTN6+AEiM0m6CoE EEbahUfBFybObu9eoUliwh5Sog/U3sxi12E6dQHlVUB+ceg5n0rDh517lbU5cDq3I3E3 XmZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qzf2LjNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56521-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXtzSHg3Ylj06ixwKv1V0ccPfHv1h42XhevDjpYWDQ9x+fOPjSd1LzD0D3IfFLVWBwMMPOWuhwZQC5iol3Jd31hZz1sAuHqcIFSvAPkjA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ee25-20020a056402291900b0055efa2b5557si857827edb.378.2024.02.07.05.11.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:11:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qzf2LjNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56521-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A9E0E1F25D0E for ; Wed, 7 Feb 2024 13:11:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AAFC5B5BF; Wed, 7 Feb 2024 13:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qzf2LjNa" 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 34E6E76C7C for ; Wed, 7 Feb 2024 13:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311395; cv=none; b=WKig2bQjfUa9ZQiRioh4L/azebn+/X6gK3stw6QhuS/lcJb5sQzSidY5ws8yC3dGujqHMeJX4Py4XRpvzRh+Xiz09rNas+UGnOhZKSwNSUOLKrS/5vmILjQzFMOVHqIcl13SUgkKetwhwUFKme0DNaCtrqQj3d4FwzZfmYf+jW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311395; c=relaxed/simple; bh=/Y7Rp6JLK3KTUfIx/d3yU8gPQzkl6YzLrdpKTC1zKcc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ea/DuEjYnyXym0L/V3hhSawlEWwC5gaat2Hz02kqVgQxoVfbus9q3LpbDet54JgV/l0rMlVINwJmjZHIHXvXDhC02wb1n4Qy7lCF/X4hAAZt4MaTJr3LdyBQvZUd8XkcP2vspWTt+Hhngi6jvCQSUU/t9pJ8ihv0c+MUpXPoQms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qzf2LjNa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39BDEC433F1; Wed, 7 Feb 2024 13:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707311394; bh=/Y7Rp6JLK3KTUfIx/d3yU8gPQzkl6YzLrdpKTC1zKcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qzf2LjNaBzADUEIfJKQj8khlEXm7FaNk2pHW1eIb1Dl6gs8Bpn2aDuCFmYckUjT05 1j6mKhh2XUkW+4LGNqPg9vEXYrN6URtTgGMS79Ufp0Qp8v3egYXiMIaQFCxTT7uGME i96LxnMx+Hlih/J227Yrs08pZLNh3HoRcWJlU9FoRwrj5SWsbhnDF+jMH/WqLVbBve AqCDAecyL+4aLrvaUW3zyjP+TvTNNEkWzccyBNVzuI2sr37ytdGKxitVm4igJps70U ThwPrDwk+e2IasVtBi0FMDeXT3lC+8hmmsbibbvcVwHlAHCmX470ufOChOHMBHKDJm SPiqN8PFVjl8A== Date: Wed, 7 Feb 2024 13:09:51 +0000 From: Mark Brown To: Dave Martin Cc: Will Deacon , Catalin Marinas , Oleg Nesterov , Al Viro , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Doug Anderson Subject: Re: [PATCH] arm64/sve: Lower the maximum allocation for the SVE ptrace regset Message-ID: References: <20240203-arm64-sve-ptrace-regset-size-v1-1-2c3ba1386b9e@kernel.org> 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="6rmfeupVH/TKSQ1M" Content-Disposition: inline In-Reply-To: X-Cookie: You might have mail. --6rmfeupVH/TKSQ1M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 07, 2024 at 12:23:56PM +0000, Dave Martin wrote: > On Mon, Feb 05, 2024 at 05:41:47PM +0000, Mark Brown wrote: > > On Mon, Feb 05, 2024 at 05:11:59PM +0000, Dave Martin wrote: > > > If the kernel is now juggling two #defines for the maximum vector size, > > > this feels like it may seed bitrot... > > Ideally we'd just not have the existing define externally but it's there > > and it's been used. > To clarify, is this intended as a temporary band-aid against silly > behaviour while a cleaner solution is found, or a permanent limitation? Ideally we'd just make everything dynamic, other than the regset issue and the bitmasks used for VL enumeration we're there already. Making the bitmasks dynamically sized is more painful but are also doing enumeration that userspace doesn't need to do. > We'd need to change various things if the architectural max VL actually > grew, so no forward-portability is lost immediately if the kernel > adopts 16 internally, but I'm still a little concerned that people may > poke about in the kernel code as a reference and this will muddy the > waters regarding how to do the right thing in userspace (I know people > shouldn't, but...) I think if we fix the ptrace regset issue we're doing a good enough job of just using fully dynamic sizing with no limits other than what's been enumerated there. We could possibly deal with the enumberation code by changing it to use ZCR/SMCR_ELx_LEN_ based defines so that it's obviously coming from what we can possibly write to the register but it's a bit less clear how to do that neatly. --6rmfeupVH/TKSQ1M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXDgR4ACgkQJNaLcl1U h9AoCwf/UzA9RWQOz5FFe8FoxTh4RW10IfcyZsauHYVzBn/Z+KxZldwBeYc/LCnk gPyi9nj/lr0NPtBUk/BHN0mJdlmIWwA8uq2XE67tXYIrAPwXvcox0eqPJoRDmjgZ Huaw2kepFzaO1SUdnFoc95jXBOJeFwkoVXrzZxPQEHqK7JUY2q1z1U4S+G48LOs/ Wrxv/U1Uc9HiGvbOnUhbJcGk2QEW1uIMV2sYLuI87EhOf3aGhDN+cVWOhzcMBx9w QrjkzGdMn5oDmlnKFDCMkftE++y3WGxLiKDo045a85HVyski2lZ0gkwpaGAolbo7 iWKVOfzkWIO7TxNG/PF5BkCcUKAxmA== =fQjN -----END PGP SIGNATURE----- --6rmfeupVH/TKSQ1M--