Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705548
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Will Deacon <will.deacon@arm.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] arm64: correct modules range of kernel virtual memory layout |
| Date | Mon, 07 Aug 2017 16:10:03 +0200 |
| Message-ID | <ubQTg-Rb-7@gated-at.bofh.it> (permalink) |
| References | <ubO53-7rt-9@gated-at.bofh.it> <ubQ6S-fz-7@gated-at.bofh.it> <ubQ6S-fz-5@gated-at.bofh.it> |
| X-Original-To | Ard Biesheuvel <ard.biesheuvel@linaro.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Miles Chen <miles.chen@mediatek.com>, Catalin Marinas <catalin.marinas@arm.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com |
| X-Original-Date | Mon, 7 Aug 2017 15:01:39 +0100 |
| X-Original-Message-ID | <20170807140138.GB18817@arm.com> |
| X-Original-References | <1502103886-19725-1-git-send-email-miles.chen@mediatek.com> <20170807131608.GA18817@arm.com> <CAKv+Gu9qD_-GNHus5txiqj9eHLpU5S7RX8QxYeUG17Ok0QNz-A@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1705548 |
Show key headers only | View raw
On Mon, Aug 07, 2017 at 02:18:00PM +0100, Ard Biesheuvel wrote:
> On 7 August 2017 at 14:16, Will Deacon <will.deacon@arm.com> wrote:
> > On Mon, Aug 07, 2017 at 07:04:46PM +0800, Miles Chen wrote:
> >> The commit f80fb3a3d508 ("arm64: add support for kernel ASLR")
> >> moved module virtual address to
> >> [module_alloc_base, module_alloc_base + MODULES_VSIZE).
> >>
> >> Display module information of the virtual kernel
> >> memory layout by using module_alloc_base.
> >>
> >> testing output:
> >> 1) Current implementation:
> >> Virtual kernel memory layout:
> >> modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
> >> 2) this patch + KASLR:
> >> Virtual kernel memory layout:
> >> modules : 0xffffff8000560000 - 0xffffff8008560000 ( 128 MB)
> >> 3) this patch + KASLR and a dummy seed:
> >> Virtual kernel memory layout:
> >> modules : 0xffffffa7df637000 - 0xffffffa7e7637000 ( 128 MB)
> >>
> >> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
> >> ---
> >> arch/arm64/mm/init.c | 5 +++--
> >> 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > Does this mean the modules code in our pt dumper is busted
> > (arch/arm64/mm/dump.c)? Also, what about KASAN, which uses these addresses
> > too (in kasan_init)? Should we just remove MODULES_VADDR and MODULES_END
> > altogether?
> >
>
> I don't think we need this patch. The 'module' line simply prints the
> VA region that is reserved for modules. The fact that we end up
> putting them elsewhere when running randomized does not necessarily
> mean this line should reflect that.
I was more concerned by other users of MODULES_VADDR tbh, although I see
now that we don't randomize the module region if kasan is enabled. Still,
the kcore code adds the modules region as a separate area (distinct from
vmalloc) if MODULES_VADDR is defined, the page table dumping code uses
MODULES_VADDR to identify the module region and I think we'll get false
positives from is_vmalloc_or_module_addr, which again uses the static
region.
So, given that MODULES_VADDR never points at the module area, can't we get
rid of it?
Will
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] arm64: correct modules range of kernel virtual memory layout Miles Chen <miles.chen@mediatek.com> - 2017-08-07 13:10 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-07 15:20 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Miles Chen <miles.chen@mediatek.com> - 2017-08-07 15:40 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-07 15:50 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Will Deacon <will.deacon@arm.com> - 2017-08-07 16:10 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Miles Chen <miles.chen@mediatek.com> - 2017-08-08 06:50 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Miles Chen <miles.chen@mediatek.com> - 2017-08-08 07:30 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Will Deacon <will.deacon@arm.com> - 2017-08-08 15:20 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-08 16:10 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Will Deacon <will.deacon@arm.com> - 2017-08-08 16:20 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-08 16:30 +0200
Re: [PATCH] arm64: correct modules range of kernel virtual memory layout Will Deacon <will.deacon@arm.com> - 2017-08-07 15:20 +0200
csiph-web