[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210601135415.GZ30436@shell.armlinux.org.uk>
Date: Tue, 1 Jun 2021 14:54:15 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Mike Rapoport <rppt@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Christian Borntraeger <borntraeger@...ibm.com>,
David Hildenbrand <david@...hat.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Vasily Gorbik <gor@...ux.ibm.com>,
Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
linux-mm@...ck.org, linux-s390@...r.kernel.org
Subject: Re: [RFC/RFT PATCH 2/5] memblock: introduce generic
memblock_setup_resources()
On Mon, May 31, 2021 at 03:29:56PM +0300, Mike Rapoport wrote:
> + code_resource.start = __pa_symbol(_text);
> + code_resource.end = __pa_symbol(_etext)-1;
> + rodata_resource.start = __pa_symbol(__start_rodata);
> + rodata_resource.end = __pa_symbol(__end_rodata)-1;
> + data_resource.start = __pa_symbol(_sdata);
> + data_resource.end = __pa_symbol(_edata)-1;
> + bss_resource.start = __pa_symbol(__bss_start);
> + bss_resource.end = __pa_symbol(__bss_stop)-1;
This falls short on 32-bit ARM. The old code was:
- kernel_code.start = virt_to_phys(_text);
- kernel_code.end = virt_to_phys(__init_begin - 1);
- kernel_data.start = virt_to_phys(_sdata);
- kernel_data.end = virt_to_phys(_end - 1);
If I look at one of my kernels:
c0008000 T _text
c0b5b000 R __end_rodata
... exception and unwind tables live here ...
c0c00000 T __init_begin
c0e00000 D _sdata
c0e68870 D _edata
c0e68870 B __bss_start
c0e995d4 B __bss_stop
c0e995d4 B _end
So the original covers _text..__init_begin-1 which includes the
exception and unwind tables. Your version above omits these, which
leaves them exposed.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists