From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFBFEC531DF for ; Tue, 20 Aug 2024 17:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qAyv2Bl+Vr7prkxFYvdrSiCl6sP6gvq9wg5hRiRDoM0=; b=3Y6UAryIsgojsEGKARqzxQ9eDW 7TzEnTK0qnuSfRB19A/hjrc3Q7NaJaZSefieUvaqhjO+X1nwcZkn3yJ4AyeO2/VbVeWZmIb6oqwBn GH/8T+w8XLsueICoESnevf0gMZiTRk18Z930AoFbYWS9yyXzXl/D3B3X03703yPSk4V6/rVfF8Qa4 cIUFOg29EPzObrPmykfsxTzEdcwpYW72S1sPLbzKTZGUsghIsMR0TWsmvv9xNIbUZkZpii858bCQf j/Yh74gz9O+g9aYqVibVkcZe1kcS7/17ju6qKtwW403pNguF1j+wqewEzKzmNfunyd+XH4NzV+lt+ HtEyDMzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgShB-00000006C2l-0HB9; Tue, 20 Aug 2024 17:31:01 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgSgS-00000006Bq5-3NKN; Tue, 20 Aug 2024 17:30:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3F62EA402A2; Tue, 20 Aug 2024 13:30:09 -0400 (EDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFB55C4AF52; Tue, 20 Aug 2024 17:30:09 +0000 (UTC) Date: Tue, 20 Aug 2024 18:30:07 +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 13/40] arm64/mm: Map pages for guarded control stack Message-ID: References: <20240801-arm64-gcs-v10-0-699e2bd2190b@kernel.org> <20240801-arm64-gcs-v10-13-699e2bd2190b@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_103016_926270_C54EF6AB X-CRM114-Status: GOOD ( 20.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 20, 2024 at 04:28:21PM +0100, Mark Brown wrote: > On Tue, Aug 20, 2024 at 03:59:21PM +0100, Catalin Marinas wrote: > > On Mon, Aug 19, 2024 at 05:33:24PM +0100, Mark Brown wrote: > > > On Mon, Aug 19, 2024 at 10:10:36AM +0100, Catalin Marinas wrote: > > > > Is there any arch restriction with setting BTI and GCS? It doesn't make > > > > sense but curious if it matters. We block the exec permission anyway > > > > (unless the BTI pages moved to PIE as well, I don't remember). > > > > As you say BTI should be meaningless for a non-executable page like GCS, > > > I'm not aware of any way in which it matters. BTI is separate to PIE. > > > My thoughts were whether we can get rid of this hunk entirely by > > handling it in the core code. We'd allow BTI if one wants such useless > > combination but clear VM_MAYEXEC in the core code (and ignore VM_SHARED > > since you can't set it anyway). > > I have to admit that the BTI because I was shoving _EXEC in there rather > than because it specifically needed to be blocked. So change the check > for VM_SHARED to a VM_WARN_ON(), and leave the _EXEC check for now > pending the above core change? Yes, sounds good. -- Catalin