From mboxrd@z Thu Jan 1 00:00:00 1970 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 634911B3749; Thu, 15 Aug 2024 17:00:23 +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=1723741223; cv=none; b=fz04eRcLSvGWh8cuzAj1ZMrAPP8002CPg0EfEZInROP1kroHrRen8B3FhoS4u1eZg/SrxV8D0TTCMPNcNUPDXXrPZHqOc+nszK3iCGPaciuQjo4pMf4Pf5LiW9LvQbDM/6LJ5BDcd3sYmX+qU+xtF4duW+yEop4A1Fs+O0fvZd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741223; c=relaxed/simple; bh=Gg6eqMTXx74NWcO2J4NNXwW0PfKl0OCmoU0K7Wl6Ryg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RcoEaH+u6u7K68p7xlsOGdAFbNv0usFHgHjQ/atWBbZIvuOjc2pPi9cz2Y6HGzOCsgiUWB3L66W/ykpdzrBvzSU5QrYUYoN1IWrXrSZD9/vt+AJvSYb34ZOoNfk/L2GuMUzRoGZm+P6iYDJTIaGxYlL8k6u0L8b4MzIbRS9Y2LE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AED9C32786; Thu, 15 Aug 2024 17:00:17 +0000 (UTC) Date: Thu, 15 Aug 2024 18:00:15 +0100 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , Kees Cook , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , Ross Burton , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v10 04/40] arm64: Document boot requirements for Guarded Control Stacks Message-ID: References: <20240801-arm64-gcs-v10-0-699e2bd2190b@kernel.org> <20240801-arm64-gcs-v10-4-699e2bd2190b@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240801-arm64-gcs-v10-4-699e2bd2190b@kernel.org> On Thu, Aug 01, 2024 at 01:06:31PM +0100, Mark Brown wrote: > + - If EL2 is present: > + > + - GCSCR_EL2 must be initialised to 0. > + > + - If the kernel is entered at EL1 and EL2 is present: > + > + - GCSCR_EL1 must be initialised to 0. > + > + - GCSCRE0_EL1 must be initialised to 0. Currently booting.rst doesn't list *_EL1 registers to be initialised when the kernel is entered at EL1, that would usually be the responsibility of EL1. The exception is some bits in SCTLR_EL1 around not entering with the MMU and caches enabled. But here I think it makes sense to add these GCS registers since if some random bits are set, they can affect kernels (and user apps) that don't have GCS support. Don't we need HCRX_EL2.GCSEn to be set when entered at EL1? -- Catalin