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 X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00D20C4338F for ; Mon, 2 Aug 2021 13:12:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BCF6460D07 for ; Mon, 2 Aug 2021 13:12:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BCF6460D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sVdRO9D2oeZSHbtFsq3b0sSYyhBlRzXAFwtD3YZt1fs=; b=u5dDeIfuDVVC53 ROUYvaQcdzcLO/63i7y7PBi2wrnBsI/BHMU51tO0rDwbO5S8lNOSd+DxfqeI/2D1Tn6bdPm3VKUk9 u9ovTlpCJzDAvUbWg1ts07KKqcIaIxXuAB2MC5q7tN3iamwvC+nethT7gdWAaqp/O3BK4CCvKd3mZ dQ+MydYmB1uKbrNNcSBROg/b6ZW16vdfNHle7V1MaZcNw0cd8+X2dvobvT+8wn0A7ZPW+ucQ8jcN4 jBbb1TdizXxjNHOzCM+GNXMx5ddxZQaOcZ2lm1bfth7q2MrpdgTjkds27oJfq+mOOFPi8oGDn0BRc m9GGdXaZQesq5QSKtrHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAXj0-00GJrk-IF; Mon, 02 Aug 2021 13:11:22 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAXiu-00GJow-R5 for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 13:11:20 +0000 Received: by mail-wm1-x333.google.com with SMTP id i10-20020a05600c354ab029025a0f317abfso4010917wmq.3 for ; Mon, 02 Aug 2021 06:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Y+0uaIcI0mf0ejSXXUrubCKbBMCdNsNKojVgct2vGJc=; b=byi63PIOkTLrQ3+UVW6t6Nu8bIplNFnTeI8Al2gNkJj/Ntg9CXWWhVqe2Y6WGtrj74 Zjt2WO0HgkRiXwOm2DP9hu5N+igm0XJwOM52BYAcf2rTDeYhwNOpAT80bBzwkuNlw0dm VwiIz+l+w/zRklTygHBpoulOMIPVMDfUD2wl7HDy0F8hEmdzlUAabcdkOEehUB45MTrP iEAc+DG+MTBDD483So934wmNTSUVZGKVPgVT/s6va8wV/Zs5HrZZgKxu9QiqSis3XAft IqltpSp2l22oHBbjTLkroYFTLhjkAbn+h2gWjiHlqsk28mNjMjLuKEC+rcuSrSrOKtn/ UPbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Y+0uaIcI0mf0ejSXXUrubCKbBMCdNsNKojVgct2vGJc=; b=N7O1UZfV3MVtG7zyOLKv2CuNSn1MV1DQjwzb7zR3MZU7MBd7k6Xr7ERYxmc+Lcn5gV mmXQn+5zeTd0uI6hHgiW/Y7JWlNCC46RUrh7CcmZeIYjRG2Q3CsJwnJHNr+YjrHKPzns OFLg9ZCexYz/yIyzp1bOHZHfT5zjIrVetQmeuAzI9kJamWbjyzvuz0U3HPrLGkU1OncD qQBn9dAsYwS+jrlnSkMvJpzxrBPOLu+EzDp3/hupsIopZd+MzkwaA2/P37kwQzHfJUdI EGqZNRaoo5e5dEvKfVOJ6D16CnsbDcHczP0XiJmfV8mbDWEImo6DGx85PyXkXJraeF1f X5Dw== X-Gm-Message-State: AOAM533F1QwB1XoA19ct3T00jMghhw6XSP2eZ9VENwpRpmml6NRF231M lcmS+Y2pTwl+hrZhDKTMg7TS7XaPGZEQrQ== X-Google-Smtp-Source: ABdhPJy6LhSB+zaOl8biQZCLEmpra28+MUW1EPrRJ99jo7BMsfeo2ldRPESQWWEITnMPTAsaU2dASA== X-Received: by 2002:a1c:4409:: with SMTP id r9mr16799679wma.150.1627909870168; Mon, 02 Aug 2021 06:11:10 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:44fe:c9a8:c2b2:3798]) by smtp.gmail.com with ESMTPSA id d5sm11047663wre.77.2021.08.02.06.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 06:11:09 -0700 (PDT) Date: Mon, 2 Aug 2021 14:11:07 +0100 From: Quentin Perret To: Marc Zyngier Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Alexandru Elisei , Will Deacon , Catalin Marinas , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v2 1/2] arm64: Move .hyp.rodata outside of the _sdata.._edata range Message-ID: References: <20210802123830.2195174-1-maz@kernel.org> <20210802123830.2195174-2-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210802123830.2195174-2-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210802_061116_916354_1FDD6F99 X-CRM114-Status: GOOD ( 23.02 ) 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 Hi Marc, On Monday 02 Aug 2021 at 13:38:29 (+0100), Marc Zyngier wrote: > 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. 2d7bf218ca73 ("KVM: arm64: Add .hyp.data..ro_after_init ELF section") states explicitly that the hyp ro_after_init section should remain RW in the host as it is expected to modify it before initializing EL2. But I can't seem to trigger anything with this patch applied, so I'll look into this a bit more. > Fixes: 380e18ade4a5 ("KVM: arm64: Introduce a BSS section for use at Hyp") Not sure this is the patch to blame? > Suggested-by: Catalin Marinas > Signed-off-by: Marc Zyngier > Cc: stable@vger.kernel.org #5.13 > --- > arch/arm64/kernel/vmlinux.lds.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S > index 709d2c433c5e..f6b1a88245db 100644 > --- 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 > -- > 2.30.2 Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel