All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Mike Rapoport <rppt@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Vasily Gorbik <gor@linux.ibm.com>, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
	linux-mm@kvack.org, linux-s390@vger.kernel.org
Subject: Re: [RFC/RFT PATCH 2/5] memblock: introduce generic memblock_setup_resources()
Date: Tue, 1 Jun 2021 14:54:15 +0100	[thread overview]
Message-ID: <20210601135415.GZ30436@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210531122959.23499-3-rppt@kernel.org>

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!

WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Mike Rapoport <rppt@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Vasily Gorbik <gor@linux.ibm.com>, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
	linux-mm@kvack.org, linux-s390@vger.kernel.org
Subject: Re: [RFC/RFT PATCH 2/5] memblock: introduce generic memblock_setup_resources()
Date: Tue, 1 Jun 2021 14:54:15 +0100	[thread overview]
Message-ID: <20210601135415.GZ30436@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210531122959.23499-3-rppt@kernel.org>

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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-01 13:54 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 12:29 [RFC/RFT PATCH 0/5] consolidate "System RAM" resources setup Mike Rapoport
2021-05-31 12:29 ` Mike Rapoport
2021-05-31 12:29 ` [RFC/RFT PATCH 1/5] s390: make crashk_res resource a child of "System RAM" Mike Rapoport
2021-05-31 12:29   ` Mike Rapoport
2021-06-01  8:45   ` David Hildenbrand
2021-06-01  8:45     ` David Hildenbrand
2021-06-01  9:02     ` David Hildenbrand
2021-06-01  9:02       ` David Hildenbrand
2021-06-02  6:25       ` Mike Rapoport
2021-06-02  6:25         ` Mike Rapoport
2021-06-01 13:18   ` Gerald Schaefer
2021-06-01 13:18     ` Gerald Schaefer
2021-06-02  6:54     ` Mike Rapoport
2021-06-02  6:54       ` Mike Rapoport
2021-05-31 12:29 ` [RFC/RFT PATCH 2/5] memblock: introduce generic memblock_setup_resources() Mike Rapoport
2021-05-31 12:29   ` Mike Rapoport
2021-06-01 13:54   ` Russell King (Oracle) [this message]
2021-06-01 13:54     ` Russell King (Oracle)
2021-06-02  8:33     ` Mike Rapoport
2021-06-02  8:33       ` Mike Rapoport
2021-06-02 10:15       ` Russell King (Oracle)
2021-06-02 10:15         ` Russell King (Oracle)
2021-06-02 13:54         ` Mike Rapoport
2021-06-02 13:54           ` Mike Rapoport
2021-06-02 15:51           ` Russell King (Oracle)
2021-06-02 15:51             ` Russell King (Oracle)
2021-06-02 18:43             ` Mike Rapoport
2021-06-02 18:43               ` Mike Rapoport
2021-06-02 20:15               ` Russell King (Oracle)
2021-06-02 20:15                 ` Russell King (Oracle)
2021-06-03 10:32                 ` Mike Rapoport
2021-06-03 10:32                   ` Mike Rapoport
2021-05-31 12:29 ` [RFC/RFT PATCH 3/5] arm: switch to " Mike Rapoport
2021-05-31 12:29   ` Mike Rapoport
2021-05-31 12:29 ` [RFC/RFT PATCH 4/5] MIPS: switch to generic memblock_setup_resources Mike Rapoport
2021-05-31 12:29   ` Mike Rapoport
2021-05-31 12:29 ` [RFC/RFT PATCH 5/5] arm64: switch to generic memblock_setup_resources() Mike Rapoport
2021-05-31 12:29   ` Mike Rapoport
2021-06-01 13:44 ` [RFC/RFT PATCH 0/5] consolidate "System RAM" resources setup Russell King (Oracle)
2021-06-01 13:44   ` Russell King (Oracle)
2021-06-02  7:05   ` Mike Rapoport
2021-06-02  7:05     ` Mike Rapoport
  -- strict thread matches above, loose matches on Subject: below --
2021-06-01  1:39 [RFC/RFT PATCH 2/5] memblock: introduce generic memblock_setup_resources() kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210601135415.GZ30436@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=catalin.marinas@arm.com \
    --cc=david@redhat.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=rppt@kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.