Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1544635pxb; Thu, 16 Sep 2021 09:37:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRq18LJxpQ1mAmxAfJjkNJVc0DyoN73AQ7t1eb3lqkhimGqJlOk0eS2/Ee7m255cWZHn1j X-Received: by 2002:a92:ad0a:: with SMTP id w10mr4548414ilh.93.1631810225449; Thu, 16 Sep 2021 09:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631810225; cv=none; d=google.com; s=arc-20160816; b=Su1laE3mZtNrFO+Cgv3fCinYlxcuu/KeQJS+gcUP9PamgdookiyY+BIAxKOAlvb3OX XhzNaNCvz0w2dT7hGELoPuKaitehJDD0oNRX5G9kwbB7HA8MEBCVyvI8p/Q1Bs4Yh/eg RBQj1YAFzxk8iWQAPBA7Mm9A2OYf241A8eKO2NcRVBANS7TWnq3Rrw07DvyG+evdoyGp ddW0v64FL6MJH0xltRkSVhPjbWwkz73pKKBM30YvYb8R9gj+oBS24ho/J86OGigujhKc cxJW8oyqUMGZhvno7hUEa2Ucrrx2ppMEJrvOenLprFjJt3WdJPeZI/HwrjXynxVZgBPQ +eZA== 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=i6wdh6/8Hc3R9F0MVfGAYQBq9/uaLw+DcvgQ0V4YBzZKl1hJYgaRCdXwPoNmVQG1pW NalAGRnKVAhWq/HlIJWqlCYFhL1ZBjkRakaVzvZvX1nu5o3glJ5y/pd/kUEgBqUF68pR dsKmT6n8MfaRxRVXEBb5SnNeyKzJiuIWDI4NGvuZHHpooFO8xuoRER8StUR74pMEVxJu DSCpacwmTVFPmQ8pQ/GlZsi6fC9WG/MHgUeoiOwaVkDggN+QE0JdP37WpF7WNPJIM/vw F3dhzyXSrflYEaYdrQV37PKATy8ZjaD/UOX8Tg8DYuJg5cU13lPblshLd6gYBHgNgkJm 5mJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Txq/WYGI"; 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 y28si3102532iot.48.2021.09.16.09.36.54; Thu, 16 Sep 2021 09:37:05 -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="Txq/WYGI"; 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 S243720AbhIPQgb (ORCPT + 99 others); Thu, 16 Sep 2021 12:36:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:37482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242055AbhIPQ3J (ORCPT ); Thu, 16 Sep 2021 12:29:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9803261360; Thu, 16 Sep 2021 16:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809099; bh=foSDhwIrzkZlMBDyR4FVkWyGMHp6xfz85SD8oFVaNa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Txq/WYGIS0CLU36NgY2d9ttPoI0F58KpsF0V5Qo7aZkizAjTMg7BuwhQ9w8CdKYrn cl+VBMG7+YFe9MTCabW3uZkf5b75WD/Z1AXtMcDy7SPRYATHRCAO4QxlKEE5Ci5qAL lg9XsXmGAKLz4eTJ4vTTr4yfmyO9ADo0YVgSo0VA= 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.13 030/380] arm64: Move .hyp.rodata outside of the _sdata.._edata range Date: Thu, 16 Sep 2021 17:56:27 +0200 Message-Id: <20210916155804.988033925@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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