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 5F444C678D4 for ; Mon, 6 Mar 2023 12:29:51 +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: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=Dg72gKRpPO66FG/a1X1AGr3Or+wPaPCWfOGsIYK6F0Y=; b=INTe0BdutWEkvd pp9LRO2nXv+rsYxgM6fp7o943S5n4R3x3r1n+eNpWIa0iac2KVcxYKXLyxHjasphYRaPX0sgAOH2b dNd3dVyYcCSKjgPvTacQfflxsSCeWXk2R30BW7n9385g6sb5dHvJHdU0HA9PrH+vg54iYNdYo+Q3f WI39vc7a9wc/ogf3NKlzIwQfCVIQeQPrKIhYlTLDNDQBIVYuo7TVodzwV1zjYHL+HxY4WvRc9s49k tYVNjVly9PrNHcTeXuZoaG2CPsK3WUIa9C/H8qvZjYj+abmfqiJBKhw4ylHz388G3mKsym8ovF2zU qaREzubxusZcNllPJvbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZ9xS-00ChRi-TY; Mon, 06 Mar 2023 12:28:51 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZ9xL-00ChPK-FK for linux-arm-kernel@lists.infradead.org; Mon, 06 Mar 2023 12:28:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OOwsDntjIKex0UXX4PvsSe30lt6AMd9spZxoObCB/2U=; b=W/gV7hRiVVAZOkrkZ+JBYTwlqV L0ukXGRZgvUkMcgPZA+riCZRd9lJ6YGicMOh8tXDfXekPrqVXcms6DMSxo3+gXY7N4SjjGZop8S6i +KaCTGWumCYqZtY+Rav29q4ay3QNFluqhxph0uo1QgQzACgPmEx2eG2ZOTlIIKE9wLnMvjPKeZi0q 8hv/nP/FpgFEJB+G76TDBW59I1bCpOYc82iJuxgh9zCa/DfMpOCX9Zvc7gakKWbmiwbPH41VkNKfE /78Gva979C3hUhBycz8a3QTBpEQPkXurD1vI/RnFPr9strTF6UdDa5WsBg1yVKntnch/dBIfhLpbj RLajglVQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43970) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pZ9xF-0005hl-Ly; Mon, 06 Mar 2023 12:28:37 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pZ9xE-0000UL-7W; Mon, 06 Mar 2023 12:28:36 +0000 Date: Mon, 6 Mar 2023 12:28:36 +0000 From: "Russell King (Oracle)" To: Jungseung Lee Cc: linus.walleij@linaro.org, amit.kachhap@arm.com, ardb@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, keescook@chromium.org, js07.lee@gmail.com Subject: Re: [PATCH 2/2] arm/mm : Report actual image regions in /proc/iomem Message-ID: References: <1678081915-12599-1-git-send-email-js07.lee@samsung.com> <1678081915-12599-2-git-send-email-js07.lee@samsung.com> <076401d95025$305fb150$911f13f0$@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <076401d95025$305fb150$911f13f0$@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230306_042843_536236_3E6670A1 X-CRM114-Status: GOOD ( 20.77 ) 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 Mon, Mar 06, 2023 at 09:14:23PM +0900, Jungseung Lee wrote: > Hi, Russell > > > -----Original Message----- > > From: Russell King (Oracle) > > Sent: Monday, March 6, 2023 8:10 PM > > To: Jungseung Lee > > Cc: linus.walleij@linaro.org; amit.kachhap@arm.com; ardb@kernel.org; > > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > > keescook@chromium.org; js07.lee@gmail.com > > Subject: Re: [PATCH 2/2] arm/mm : Report actual image regions in > > /proc/iomem > > > > On Mon, Mar 06, 2023 at 02:51:55PM +0900, Jungseung Lee wrote: > > > The resource reservations in /proc/iomem made for the kernel image > > > did not reflect the gaps between text, rodata, and data. > > > Add the "rodata" resource and update the start/end calculations. > > > > > > Before : > > > 04000000-2f7fffff : System RAM > > > 04100000-04cfffff : Kernel code > > > 04e00000-05369a27 : Kernel data > > > > > > After : > > > 04000000-2f7fffff : System RAM > > > 04100000-049fffff : Kernel code > > > 04a00000-04cb2fff : Kernel rodata > > > 04e00000-05369a27 : Kernel data > > > > NAK. This is API, and programs do read and parse this file. It is > > important that this file reports these parameters in a similar way to > > other architectures. Other architectures do not split up the > > individual regions. > > > > Sounds like an important point, but I failed to find which programs use it > as an API. Could you tell me which program uses it as an API? > > In fact, x86 architecture also split up the individual regions in this way. > In addition, most architectures separate the "Kernel bss" area, but arm does > not. Take a look at kexec-tools - that certainly does parse /proc/iomem looking for entries such as "Kernel code" and "Kernel data". It's fine for an architecture to decide to do something else if it started to do it early on, but not when something has been established for decades. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel