From patchwork Tue Apr 19 07:01:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mawupeng X-Patchwork-Id: 12817441 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30167C4332F for ; Tue, 19 Apr 2022 06:43:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8396A8D004E; Tue, 19 Apr 2022 02:43:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C17C8D0047; Tue, 19 Apr 2022 02:43:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63AC48D004E; Tue, 19 Apr 2022 02:43:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 4FF1C8D0047 for ; Tue, 19 Apr 2022 02:43:10 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 159D9249B1 for ; Tue, 19 Apr 2022 06:43:10 +0000 (UTC) X-FDA: 79372686540.07.E861BEC Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf08.hostedemail.com (Postfix) with ESMTP id 53801160007 for ; Tue, 19 Apr 2022 06:43:08 +0000 (UTC) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KjDl90WqmzhXfg; Tue, 19 Apr 2022 14:43:01 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Apr 2022 14:43:05 +0800 Received: from localhost.localdomain (10.175.112.125) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Apr 2022 14:43:04 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 0/2] Add support to relocate kernel image to mirrored region Date: Tue, 19 Apr 2022 15:01:48 +0800 Message-ID: <20220419070150.254377-1-mawupeng1@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 53801160007 X-Stat-Signature: q588asbs6g4yb8k68e5odt4mf73875jr Authentication-Results: imf08.hostedemail.com; dkim=none; spf=pass (imf08.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1650350588-45753 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001331, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Ma Wupeng Now system image will perfer to be located to mirrored regions both KASLR on and off. Ma Wupeng (2): arm64/boot/KASLR: Add support to relocate kernel image to mirrored region arm64/boot: Add support to relocate kernel image to mirrored region without kaslr drivers/firmware/efi/libstub/arm64-stub.c | 62 +++++++++++++++++++++- drivers/firmware/efi/libstub/efistub.h | 7 ++- drivers/firmware/efi/libstub/randomalloc.c | 14 ++++- 3 files changed, 79 insertions(+), 4 deletions(-)