Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1895511pxb; Thu, 16 Sep 2021 19:24:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc4mFaD/CP4QxvlwW0CspXzRG69seaoNFhDJPokVJmEcgfIAEbvuX4i8ZRV0hP+48O+eOL X-Received: by 2002:a17:906:7d42:: with SMTP id l2mr9723829ejp.467.1631845456351; Thu, 16 Sep 2021 19:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631845456; cv=none; d=google.com; s=arc-20160816; b=UePU/fD98Zt4UZe5Hs9JJWZx1G7f1+Y0L60uSQQI+rUsPV4vdFblAGB7YyYkVs3+jZ t97RIFTCyiprZWLQdC61/Xt1/j4fx0NiJiUFD8AuQBnAD4cqWprNORl6XfDErG5AD3jk nUsa6PGXxeEc/3wruN4XNHfOvL4DR6m+zp+C7tP2ehkq8fYC4PXhDDSj0NOS2pxAmJEo PxbsdQKIzlzTb7OkXfhtfwy90NSAT7C7ZWplsUCWdxqu2hjHindpjd0+LIYTiS72vGSz elgKRk9hQudN8vxVPmE/nJzda9ibxvPf4hqB2wun1T+EfHPiaYlrT19FJhVNMOWOzk46 K2zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2y/rN/L58pezuXMqPGOlU8Tys+cYLgj31MmvkrXr8EI=; b=Fk0dVTxN+P6TZYuKMK1K8h+c98qoJ9yuLY6707JH2nH/Y+VEGLJ557TH0q1DoHPGC6 oNUSXPX10GwcgKQR5cIXfdkwAa7XMzeQcAy9A+XB0IkLTRC61jqIhIwfy/yX3RWDZS3n lE95aUgC41zvKVm2Q/Rn1slZc4ZVgdfcI9mkdhy1ZIBiovxxFVHCtWc3Gr9EiaCP+YSq rqlfblOcFGff5iBtJMGgfgGnTDl2rVjKDAsgaa/xXDgjsdwh94p3kzHZjtN7hAEAeI6W h3bnwNw/e8NfsnB6b8bhMQPC/73zoWd8WhvU3rdleotwGEY244UbaujF0GAjiHUt/Pqi clLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eoEwRIP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si5466721ejo.211.2021.09.16.19.23.52; Thu, 16 Sep 2021 19:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eoEwRIP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244713AbhIPRNb (ORCPT + 99 others); Thu, 16 Sep 2021 13:13:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:34075 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349565AbhIPRGD (ORCPT ); Thu, 16 Sep 2021 13:06:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4ABB461B26; Thu, 16 Sep 2021 16:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810153; bh=foSDhwIrzkZlMBDyR4FVkWyGMHp6xfz85SD8oFVaNa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eoEwRIP768yNbBzBmgAMDd5bFTlUOt6sO9rceiaTVNBntBJZK304mjrSduGXvoyhI Ww2tp6+mPfCsa4gkCJwqlaqcz6gD81wuKmNuEy9eMjdkjydUGgberMJPe1f078uGrV IFIiPXRBUfpge34D/KdGPP8Po3aBJsrG43eyh0tE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Catalin Marinas , Marc Zyngier Subject: [PATCH 5.14 037/432] arm64: Move .hyp.rodata outside of the _sdata.._edata range Date: Thu, 16 Sep 2021 17:56:26 +0200 Message-Id: <20210916155812.069714470@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier commit eb48d154cd0dade56a0e244f0cfa198ea2925ed3 upstream. The HYP rodata section is currently lumped together with the BSS, which isn't exactly what is expected (it gets registered with kmemleak, for example). Move it away so that it is actually marked RO. As an added benefit, it isn't registered with kmemleak anymore. Fixes: 380e18ade4a5 ("KVM: arm64: Introduce a BSS section for use at Hyp") Suggested-by: Catalin Marinas Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org #5.13 Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210802123830.2195174-2-maz@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -181,6 +181,8 @@ SECTIONS /* everything from this point to __init_begin will be marked RO NX */ RO_DATA(PAGE_SIZE) + HYPERVISOR_DATA_SECTIONS + idmap_pg_dir = .; . += IDMAP_DIR_SIZE; idmap_pg_end = .; @@ -260,8 +262,6 @@ SECTIONS _sdata = .; RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN) - HYPERVISOR_DATA_SECTIONS - /* * Data written with the MMU off but read with the MMU on requires * cache lines to be invalidated, discarding up to a Cache Writeback