From patchwork Sat Feb 3 00:04:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13543602 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 526DE6FAD; Sat, 3 Feb 2024 00:05:43 +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=1706918743; cv=none; b=NnJIAnU7BQyPDvbfcAa6IJrHVOslv8BAbIBWezyOx9/m/ipSXdo6P4CD2tHZdnMrHW7MBxKtkJiR28p6sFRdAH22yILmb3siFzVPKfQOhkVFmhnsyE4sxMUNLYvlYQmRaqT7CnQ7kPbNobLV+LXYed4kZAY59vu73cZWbQ/shuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706918743; c=relaxed/simple; bh=kiK765H9QFvcPD51NDMimYIoE+CAz43kont3MOS2Ik4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TWQtvxp5/XlatL5F8sAcqJa8mXAZtvepQ90x3BHdot4ZqPZM0nE/XrXRWdL804oKRDwM6djfCoe9n5k2qeZm9UawhZooUohXFL9solBBwdIyGPKOmxnUR/7rs5n6Acj2afzqQwhlVfadfJQcglZmdTuB8tHpwvxGaZdx6GeqqGs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FvjfNJJC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FvjfNJJC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FC7BC43394; Sat, 3 Feb 2024 00:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706918742; bh=kiK765H9QFvcPD51NDMimYIoE+CAz43kont3MOS2Ik4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FvjfNJJC6wgrEPZLZSwTVk0ET1J7SKuJvQvF5GDxDbmYKyChIkB8ymouFyiymLkI9 X/owQnCAjnUc4VHI/ma1JXnlVHAbxCLDStdlMLVKfctz0xvYgYXDXcxQriO+1jGrpj pu8wBs+Xva+81RL/HCsD3jrb6VgJQyFnorhJr2CwQn1TZHhjS480rhX9KQzqGfEa1e C8nC5PHeOsHm1AX/s1HYJ5J4RoiDgcFTeTlYCDO67rieMulRmvT5NQrojOLyUvyYE5 t1JB7ozzM0Ii09hFjUFclDNHRQ/3clwsjnvOWsUZkkSNvEqZsiUeTksns2dNqcoiuA 2onigevkxHXBQ== From: Mark Brown Date: Sat, 03 Feb 2024 00:04:59 +0000 Subject: [PATCH RFT v5 3/7] mm: Introduce ARCH_HAS_USER_SHADOW_STACK Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-clone3-shadow-stack-v5-3-322c69598e4b@kernel.org> References: <20240203-clone3-shadow-stack-v5-0-322c69598e4b@kernel.org> In-Reply-To: <20240203-clone3-shadow-stack-v5-0-322c69598e4b@kernel.org> To: "Rick P. Edgecombe" , Deepak Gupta , Szabolcs Nagy , "H.J. Lu" , Florian Weimer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Christian Brauner , Shuah Khan Cc: linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Kees Cook , jannh@google.com, bsegall@google.com, linux-kselftest@vger.kernel.org, linux-api@vger.kernel.org, Mark Brown , David Hildenbrand X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=2344; i=broonie@kernel.org; h=from:subject:message-id; bh=kiK765H9QFvcPD51NDMimYIoE+CAz43kont3MOS2Ik4=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlvYM6UvdX1xy39P6Ycpi5xqxlbO/j3vEL7OV15CBs w656sDeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb2DOgAKCRAk1otyXVSH0J7YB/ 9jR2meWiqMNmTde6tFYxtIM7l52JWZsu1IZdPUbTKAJQS0NnGcrqxkEQjDA8nn2vLD9h78yX3JAa+h po/CqlJ9GD6TXa4uOwbojPl/j3iSOelQFjJtlLw+zwDWRbR94YUpfNf68MLbfIKvcKbGOWIt/qd5cf WmfeeUTbbDFr1JL44Tk7MrDzG7XVFQKEi0HfQL9bW2wrmr1mKJ//a6XEevdWmGUk3YMJc0P8NS8l8K ceNjmQisd2pMYDjwBDlsHg9hgdCs8lZ8mzHzqArsSGz2g7sRNf51LaDbJWbag7xjYgu9UTC0KTICn1 s5vZjVItqQ8P/YOK3KRvImN5Dnr67B X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Since multiple architectures have support for shadow stacks and we need to select support for this feature in several places in the generic code provide a generic config option that the architectures can select. Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Mark Brown Reviewed-by: Rick Edgecombe Reviewed-by: Deepak Gupta