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 6AB10C64ED6 for ; Tue, 28 Feb 2023 13:55:33 +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:References:In-Reply-To: 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: List-Owner; bh=SUSzyu4JGqI/wLei6JDDXSt7e31eUeimBV72x7hdhzE=; b=zeCD8I25BUPnlK lB1Q7CDAEZrYdL6cfXLagOS8Tn+lTMCyp/TUk962EyJg/8mei/Ba9EH74k27JgUPkqN7QhLRcZGqw OyqQqTgQnXgrJEcmY37ZZPsCU1m1g1S0uc/nOu9M4qrr76pBRvvYxDvzSwUD/VkP3rlof4K3scziN xfzvNav3I9L/wmaZcVkblA5sti+t7P3EWEch0gMlRBdtLUI9eq1Gzvf+KHk6zsTnUNsA+a9nt+iAT P5z1JxUxSxxDkQizHd4l2zxi2MjZe/Tq7sqydW1jywH+WhtuCtGVhKU0XPkm5CiawYtoI11PGM8Gk Ov3kSjFmkp/TzmN27nzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pX0RA-00DLmw-9q; Tue, 28 Feb 2023 13:54:36 +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 1pX0R6-00DLlh-Oa for linux-arm-kernel@lists.infradead.org; Tue, 28 Feb 2023 13:54:34 +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 A4589B80E4A; Tue, 28 Feb 2023 13:54:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00749C433EF; Tue, 28 Feb 2023 13:54:27 +0000 (UTC) From: Catalin Marinas To: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Cc: Will Deacon , linux-efi@vger.kernel.org, mark.rutland@arm.com, maz@kernel.org, broonie@kernel.org Subject: Re: [PATCH] arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN Date: Tue, 28 Feb 2023 13:54:25 +0000 Message-Id: <167759244729.3333876.6838086578100507642.b4-ty@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223204101.1500373-1-ardb@kernel.org> References: <20230223204101.1500373-1-ardb@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_055432_982274_33A03B71 X-CRM114-Status: GOOD ( 13.15 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 23 Feb 2023 21:41:01 +0100, Ard Biesheuvel wrote: > Our virtual KASLR displacement is a randomly chosen multiple of > 2 MiB plus 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. > > 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. Currently, we use 'kaslr_offset() > 0' to decide whether or not > randomization has occurred, and so we misidentify this case. > > [...] Applied to arm64 (for-next/core), thanks! [1/1] arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN https://git.kernel.org/arm64/c/010338d729c1 -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel