From patchwork Fri Apr 29 13:13:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 12831998 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 0AC88C433EF for ; Fri, 29 Apr 2022 13:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4x6zavv0j/w84z6AR0Rpa+Z8oxNF45FxrNvfotU3lXQ=; b=REw7YyzvuX/GIJ X9M+Kd/jSEcmDtm5o6vaNJyWRI6eN2grPWbhPMQ6ns17RvsXYxEFkozV3CFNBmAu8JeoG6iDeH+l9 nbQhuHtQNcOoZLeI5z4E00lfb+8TI6qh2wBKBnyvO1lDSakyx6yurUJ65LkySGSws5aHDdJ3ziB3Y kll8MANcSsQDQjP4pIu7LFk2nWAAjhwH9p0nGVs/2g8ZmbTX0tngX+YbYmyUZfdh67UG3t5gZirjJ +17sPvUeYp8XMzXLQ1QJ2LL/T7FU20SZquFpoI34AKUF6V5xtMPLXZOhc3AozAHf7q1QB5BEwJ/5V 1JEHoDDfmgM6KNGnf3EA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkQRe-00BKIn-GU; Fri, 29 Apr 2022 13:14:02 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkQRb-00BKI1-Mt for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 13:14:01 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 64951B8330E; Fri, 29 Apr 2022 13:13:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7BA3C385A7; Fri, 29 Apr 2022 13:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651238037; bh=CQGiDe7soZmVVFRODbrMppw+bfP9im2BSFD7+4EGLV0=; h=From:To:Cc:Subject:Date:From; b=UQSJUPGEBxysSIrsqm01G6IkeL5Wm96Cxze6WlW+2UktQC05QSWKrXiafq8uUbbyW GgM1GzsZb3nypjdnLb6mxfNbCiAK4EJpkSUaGRXTnRTnMVTkuJX46DOu+jP5i3kplc 6MBpXOHO7y/TMRaIAeqy3/4Kl//vwIp/74KnsiNS+w37wF4wF3/6IWhl+lqK/jc2OP cSdaJnu+nuO4x311OWx9UgNv4PaD4F9Z6zNG3nZTlB6bAmcJvIpjzMD/lol/pmMCjP UOuGXTtnosIbes5N+1ketIL8F99s9XIuInVXzMlM8faf5PhrQQNqqPaQsCCUG91t5y xh+QD/Ez7Yy8A== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, mark.rutland@arm.com, Ard Biesheuvel Subject: [PATCH 0/2] arm64: pair of minor hardening tweaks Date: Fri, 29 Apr 2022 15:13:45 +0200 Message-Id: <20220429131347.3621090-1-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=482; h=from:subject; bh=CQGiDe7soZmVVFRODbrMppw+bfP9im2BSFD7+4EGLV0=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBia+SHn1JQAy7PSLLl6Md9g0hxE6CYwzkmKmRilncC MPjiMGWJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYmvkhwAKCRDDTyI5ktmPJACBDA C+EkQEd22DndJRwbZeRpqYLm7j4q6E0C9uwlVzT4PSTRqhiAg8paq3ogplpx6ANyLt5aDmGIyOACmu xc0rMbPO/fCntzp8FaU9iawieJYO+bB3f4uNcxOgzCWGWaYS8ziPC71nefj95QrFS90YNlaX29VhmB FfRfU5D+d/egP2fgVygJr8SLJisHWdvXBnp8fPfc5tvZYmEqZR7rwWS3nASGQxJdBMiIEWdkZbP5QZ FOgiK2iYnGPyU1GymLNGxK6MERxv26ST6dvtOWBwaIrLLzXPWO2xQZmAOsLNVpodLVhWnQZiK75JNw kcnwY1YaTyXPN9kvrBwkwf0OZpBpdW7TNxR1YFVwhdLkuEyMSQRMmPNQX6UreeXr7atv4iYDgGXBqx upPF/8n7i2vG+46Xg1aESfnbjkPlLqCdY7DkN5oumJPYDk+vwVf6aEqAca6wcZMp3VuFSdRh/CnkcF wxX/yabfrLTi4n65GQAjesUqIbBhcKIAqNqkTrsxFFN+0= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220429_061359_968498_540BE6C2 X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. 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 A couple of tweaks to the way we handle the kexec and hibernate helper code, so that it no longer gets mapped with attributes it doesn't need. Ard Biesheuvel (2): arm64: lds: move special code sections out of kernel exec segment arm64: mm: avoid writable executable mappings in kexec/hibernate code arch/arm64/kernel/vmlinux.lds.S | 20 +++++++++++--------- arch/arm64/mm/trans_pgd.c | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) Acked-by: Mark Rutland