From: Catalin Marinas <catalin.marinas@arm.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: will@kernel.org, ryabinin.a.a@gmail.com, andreyknvl@gmail.com,
dvyukov@google.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
elver@google.com, akpm@linux-foundation.org,
gregkh@linuxfoundation.org, kasan-dev@googlegroups.com
Subject: Re: [PATCH v4 3/3] kasan: arm64: Fix pcpu_page_first_chunk crash with KASAN_VMALLOC
Date: Tue, 12 Oct 2021 19:17:12 +0100 [thread overview]
Message-ID: <YWXRKFrGSkgLXNvt@arm.com> (raw)
In-Reply-To: <20210910053354.26721-4-wangkefeng.wang@huawei.com>
On Fri, Sep 10, 2021 at 01:33:54PM +0800, Kefeng Wang wrote:
> With KASAN_VMALLOC and NEED_PER_CPU_PAGE_FIRST_CHUNK, it crashs,
>
> Unable to handle kernel paging request at virtual address ffff7000028f2000
> ...
> swapper pgtable: 64k pages, 48-bit VAs, pgdp=0000000042440000
> [ffff7000028f2000] pgd=000000063e7c0003, p4d=000000063e7c0003, pud=000000063e7c0003, pmd=000000063e7b0003, pte=0000000000000000
> Internal error: Oops: 96000007 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 5.13.0-rc4-00003-gc6e6e28f3f30-dirty #62
> Hardware name: linux,dummy-virt (DT)
> pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO BTYPE=--)
> pc : kasan_check_range+0x90/0x1a0
> lr : memcpy+0x88/0xf4
> sp : ffff80001378fe20
> ...
> Call trace:
> kasan_check_range+0x90/0x1a0
> pcpu_page_first_chunk+0x3f0/0x568
> setup_per_cpu_areas+0xb8/0x184
> start_kernel+0x8c/0x328
>
> The vm area used in vm_area_register_early() has no kasan shadow memory,
> Let's add a new kasan_populate_early_vm_area_shadow() function to populate
> the vm area shadow memory to fix the issue.
>
> Acked-by: Marco Elver <elver@google.com> (for KASAN parts)
> Acked-by: Andrey Konovalov <andreyknvl@gmail.com> (for KASAN parts)
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
It looks like I only acked patch 2 previously, so here it is:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: will@kernel.org, ryabinin.a.a@gmail.com, andreyknvl@gmail.com,
dvyukov@google.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
elver@google.com, akpm@linux-foundation.org,
gregkh@linuxfoundation.org, kasan-dev@googlegroups.com
Subject: Re: [PATCH v4 3/3] kasan: arm64: Fix pcpu_page_first_chunk crash with KASAN_VMALLOC
Date: Tue, 12 Oct 2021 19:17:12 +0100 [thread overview]
Message-ID: <YWXRKFrGSkgLXNvt@arm.com> (raw)
In-Reply-To: <20210910053354.26721-4-wangkefeng.wang@huawei.com>
On Fri, Sep 10, 2021 at 01:33:54PM +0800, Kefeng Wang wrote:
> With KASAN_VMALLOC and NEED_PER_CPU_PAGE_FIRST_CHUNK, it crashs,
>
> Unable to handle kernel paging request at virtual address ffff7000028f2000
> ...
> swapper pgtable: 64k pages, 48-bit VAs, pgdp=0000000042440000
> [ffff7000028f2000] pgd=000000063e7c0003, p4d=000000063e7c0003, pud=000000063e7c0003, pmd=000000063e7b0003, pte=0000000000000000
> Internal error: Oops: 96000007 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 5.13.0-rc4-00003-gc6e6e28f3f30-dirty #62
> Hardware name: linux,dummy-virt (DT)
> pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO BTYPE=--)
> pc : kasan_check_range+0x90/0x1a0
> lr : memcpy+0x88/0xf4
> sp : ffff80001378fe20
> ...
> Call trace:
> kasan_check_range+0x90/0x1a0
> pcpu_page_first_chunk+0x3f0/0x568
> setup_per_cpu_areas+0xb8/0x184
> start_kernel+0x8c/0x328
>
> The vm area used in vm_area_register_early() has no kasan shadow memory,
> Let's add a new kasan_populate_early_vm_area_shadow() function to populate
> the vm area shadow memory to fix the issue.
>
> Acked-by: Marco Elver <elver@google.com> (for KASAN parts)
> Acked-by: Andrey Konovalov <andreyknvl@gmail.com> (for KASAN parts)
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
It looks like I only acked patch 2 previously, so here it is:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
next prev parent reply other threads:[~2021-10-12 18:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 5:33 [PATCH v4 0/3] arm64: support page mapping percpu first chunk allocator Kefeng Wang
2021-09-10 5:33 ` Kefeng Wang
2021-09-10 5:33 ` [PATCH v4 1/3] vmalloc: Choose a better start address in vm_area_register_early() Kefeng Wang
2021-09-10 5:33 ` Kefeng Wang
2021-10-12 18:21 ` Catalin Marinas
2021-10-12 18:21 ` Catalin Marinas
2021-09-10 5:33 ` [PATCH v4 2/3] arm64: Support page mapping percpu first chunk allocator Kefeng Wang
2021-09-10 5:33 ` Kefeng Wang
2021-09-17 6:24 ` Greg KH
2021-09-17 6:24 ` Greg KH
2021-09-17 6:55 ` Kefeng Wang
2021-09-17 6:55 ` Kefeng Wang
2021-09-17 7:04 ` Greg KH
2021-09-17 7:04 ` Greg KH
2021-09-17 7:24 ` Kefeng Wang
2021-09-17 7:24 ` Kefeng Wang
2021-09-10 5:33 ` [PATCH v4 3/3] kasan: arm64: Fix pcpu_page_first_chunk crash with KASAN_VMALLOC Kefeng Wang
2021-09-10 5:33 ` Kefeng Wang
2021-10-12 18:17 ` Catalin Marinas [this message]
2021-10-12 18:17 ` Catalin Marinas
2021-10-13 1:09 ` Kefeng Wang
2021-10-13 1:09 ` Kefeng Wang
2021-09-15 8:33 ` [PATCH v4 0/3] arm64: support page mapping percpu first chunk allocator Kefeng Wang
2021-09-15 8:33 ` Kefeng Wang
2021-09-16 15:41 ` Greg KH
2021-09-16 15:41 ` Greg KH
2021-09-17 1:11 ` Kefeng Wang
2021-09-17 6:24 ` Greg KH
2021-09-17 6:24 ` Greg KH
2021-09-28 7:48 ` Kefeng Wang
2021-09-28 7:48 ` Kefeng Wang
2021-10-08 13:33 ` Kefeng Wang
2021-10-08 13:33 ` Kefeng Wang
2021-10-10 21:36 ` Andrew Morton
2021-10-10 21:36 ` Andrew Morton
2021-10-11 1:09 ` Kefeng Wang
2021-10-11 1:09 ` Kefeng Wang
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=YWXRKFrGSkgLXNvt@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryabinin.a.a@gmail.com \
--cc=wangkefeng.wang@huawei.com \
--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.