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 A00B1CCA481 for ; Fri, 1 Jul 2022 14:13:56 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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=d+1m77eJYNy12hIHwNaNViMGtzHAsgc6qLLUPWBQ6ug=; b=2AR1Y8fynfrpzeyJL7SOg8V5fh lu2POqfVeTvR5GOsFXbv0AnQVbftjf4TP5q3C2n+UwAME5FNOzUlQ7OKL4TUmJrnqHMYXu4Iu5GFw BnpPk7K2RbaBzpk2xhQBs0hgCObHe6Uv1VgSPQ6Pm6U2D7YE0ER0iYcTcTaqSOrcV5L9xd94VxF1v 2oIqaCjkjdpRmjTF+l1v6PtIEDDy1dEeCCare2j8a7JhkQXN/WMlGhPSdL5BUvBuZYyl1kt1c6QPl klnhJE+bVVuW08HCoJUU/Lju980rv3inwzvSrl3BZ6kT9+Sjh+FdpyfOmC379wW9qzg9j4eS6RY3A VA22QV+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7HOC-005GKd-Ad; Fri, 01 Jul 2022 14:12:56 +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 1o7HO9-005GJO-CH for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2022 14:12:54 +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 83962B82CEF; Fri, 1 Jul 2022 14:12:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 191FBC3411E; Fri, 1 Jul 2022 14:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656684770; bh=CzECYtPGrVkRdknGI/QHyS0/hVCTR+m++jlzG+73dcE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XMfDKUWdX6Y60G0ZXVyeb5sRntaO23Ze4Z32ybA6tIb+a1hlgKJjWTYuestkk1utl RwNB4Q7Ey7uAPCi4joYB4bG0NtDwy5Xyi79oSbNlmiU8xeTwOSuy3Guvdm7vtp67Yu MX9YzhZ8/E4JU4bYWtgRunSn6G3oQdZsRWqoMgbdDoe4XZ239vOov2rctqL7lBW1nC xIRP7Vyeq6vzRxihuBk66KYu5RXUzcNRJEcY73tdmaFnAscx1NAdeAnAry1IYcnoDD 2+a2zvoa7FjGN5otpz+HH5fxWV6ZqfpYxEMMw3n1IbhKI/WXMAFYRcre5AaZ1fCDhu 7CkTVdRFLfS8A== Date: Fri, 1 Jul 2022 15:12:44 +0100 From: Mark Brown To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, Marc Zyngier , Will Deacon , Mark Rutland , Kees Cook , Catalin Marinas , Anshuman Khandual Subject: Re: [PATCH v6 2/9] arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN Message-ID: References: <20220701130444.2945106-1-ardb@kernel.org> <20220701130444.2945106-3-ardb@kernel.org> MIME-Version: 1.0 In-Reply-To: <20220701130444.2945106-3-ardb@kernel.org> X-Cookie: GIVE UP!!!! X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220701_071253_600974_FC9CA59A X-CRM114-Status: GOOD ( 15.39 ) 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: , Content-Type: multipart/mixed; boundary="===============7349061372850909415==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7349061372850909415== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FGRrRZfzuFNeqxCn" Content-Disposition: inline --FGRrRZfzuFNeqxCn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 01, 2022 at 03:04:37PM +0200, Ard Biesheuvel wrote: > Our virtual KASLR displacement consists of a fully randomized multiple > of 2 MiB, combined with an offset that is equal to the physical > placement modulo 2 MiB. This arrangement ensures that we can always use > 2 MiB block mappings (or contiguous PTE mappings for 16k or 64k pages) > to map the kernel. >=20 > This means that a KASLR offset of less than 2 MiB is simply the product > of this physical displacement, and no randomization has actually taken > place. So let's avoid misreporting this case as 'KASLR enabled'. Might be worth backporting to stable? Though the consequence is just that we might enable KPTI when we don't *need* it which is not the end of the world. Reviewed-by: Mark Brown --FGRrRZfzuFNeqxCn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmK/ANwACgkQJNaLcl1U h9D3yQf8Dlr5kKnXX2ZxUGg3ZB3JCFUuBCG1/L2T/m1PZ8Q+sHqy2JUNWLS002AO QgMZXb0tNIhwDbjCRp56bdSQqHqVJ0bI1fTuecgKpJoavs7SPp7UYb6OF5HlW3+n J8fOPiYvgbNr7pkIRWqQ6lwRxKcyaKyvKkm/XpvOzNdgrZTfXjJgjjmZR9lKnRNh MvzzF47jE0Gn+b3A4uDDXPwSWS6ddsj/OBzmNuKEXjgj5W2XSqFuOiIRokyq0IIs JBMAfXQfQhXj+x/gSENKyBXZej+L294tPVVgO6VLc2MStoJFbAJzfltL1z3ehAYG JLG1PJyCPGt6Po3Dx/V4ZqBt52U3wA== =z1Pm -----END PGP SIGNATURE----- --FGRrRZfzuFNeqxCn-- --===============7349061372850909415== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7349061372850909415==--