[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YLivq1QRcStvpsLr@kernel.org>
Date: Thu, 3 Jun 2021 13:32:11 +0300
From: Mike Rapoport <rppt@...nel.org>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Mike Rapoport <rppt@...ux.ibm.com>, 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>,
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 Wed, Jun 02, 2021 at 09:15:02PM +0100, Russell King (Oracle) wrote:
> On Wed, Jun 02, 2021 at 09:43:32PM +0300, Mike Rapoport wrote:
> > Back then when __ex_table was moved from .data section, _sdata and _edata
> > were part of the .data section. Today they are not. So something like the
> > patch below will ensure for instance that __ex_table would be a part of
> > "Kernel data" in /proc/iomem without moving it to the .data section:
> >
> This example has undesirable security implications. It moves the
> exception table out of the read-only mappings into the read-write
> mappings, thereby providing a way for an attacker to bypass the
> read-only protection on the kernel and manipulate code pointers at
> potentially known addresses for distro built kernels.
My point was that __ex_table can be in "Kernel data" or "Kernel rodata"
without loosing the ability to sort it.
> You seem to be missing the point I've tried to make. The areas in
> memblock that are marked "reserved" are the areas of reserved memory
> from the firmware _plus_ the areas that the kernel has made during
> boot which are of no consequence to userspace.
I know what areas are marked "reserved" in memblock.
I never suggested to report "ficticious" reserved areas in /proc/iomem
unless an architecture already reports them there, like arm64 for example.
You are right I should have described better the overall objective, but
sill I feel that we keep missing each other points.
I'll update the descriptions for the next repost, hopefully it'll help.
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists