kasan: fix pc crash if open kasan with vmap stack [1/1]
authorTao Zeng <tao.zeng@amlogic.com>
Fri, 25 Oct 2019 07:01:24 +0000 (15:01 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 4 Nov 2019 06:04:38 +0000 (23:04 -0700)
commita8b8b96e53a43b0ca150f941bd0deefbc656d0d4
treebfb1b4fcf8b5db833dbf39cdb40c9d2b141cc053
parent11a8073a0f8af88e36ac8d2c89ed4cb1516187d0
kasan: fix pc crash if open kasan with vmap stack [1/1]

PD#SWPL-10141

Problem:
If open KASAN, connect wifi, and auto-start apk dianshijia, it will
soon crash as:
[ 56.655524@2] Unable to handle kernel NULL pointer dereference
               at virtual address 00000050
[ 56.658155@2] pgd = d0104000
[ 56.661008@2] [00000050] *pgd=00000000
[ 56.664744@2] Internal error: Oops: 80000005 1 PREEMPT SMP ARM
               common(O) firmware(O) media_clock(O) tb_detect(O)
               dnlp_alg ldim_alg mxl661_fe_32(O)
[ 56.709028@2] CPU: 2 PID: 4930 Comm: kworker/u9:3 Tainted: O 4.9.113 #1
[ 56.716908@2] Hardware name: Generic DT based system
[ 56.721858@2] task: f2632bc0 task.stack: c2010000
[ 56.726530@2] PC is at 0x50
[ 56.729301@2] LR is at 0x0

Solution:
Fix wrong pmd check address

Verify:
TL1 X301

Change-Id: I85e01418789801e0ef7691a9d8963c233e115b28
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
arch/arm/kernel/entry-armv.S
drivers/amlogic/memory_ext/vmap_stack.c