[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cc9b8e02-e287-40c8-ad9c-34efd5e5e3f6@arm.com>
Date: Fri, 5 Sep 2025 15:30:22 +0100
From: Ada Couprie Diaz <ada.coupriediaz@....com>
To: Qun-wei Lin (林群崴) <Qun-wei.Lin@...iatek.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
Andrew Yang (楊智強) <Andrew.Yang@...iatek.com>,
Chinwen Chang (張錦文)
<chinwen.chang@...iatek.com>, Casper Li (李中榮)
<casper.li@...iatek.com>, "andreyknvl@...gle.com" <andreyknvl@...gle.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"dvyukov@...gle.com" <dvyukov@...gle.com>,
"vincenzo.frascino@....com" <vincenzo.frascino@....com>,
Ada Couprie Diaz <ada.coupriediaz@....com>
Subject: Re: [BUG] arm64: KASAN + KASLR may cause reserved page to be released
during module loading
Hi,
On 04/08/2025 15:03, Qun-wei Lin (林群崴) wrote:
> Hi,
>
> We have encountered a kernel panic on arm64 when loading modules with
> both KASAN and KASLR enabled.
>
> Kernel version:
> 6.12
> (also reproducible on 6.6-based Android common kernel)
>
> Config:
> CONFIG_KASAN=y
> CONFIG_KASAN_GENERIC=y
> CONFIG_KASAN_VMALLOC=y
> CONFIG_RANDOMIZE_BASE=y
> # CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
>
> Reproducible:
> ~50% of the time, when loading any module with Generic KASAN + KASLR
> enabled.
>
> The kernel panic log is as follows:
> [...]
> Comm:kworker/4:1 Tainted: G OE 6.12.23-android16-5-
> g1e57f0e5996f-4k #1 eee834a579887c0f97d696d30c786233f4fbfcdf
> [...]
>
> If I disable KASLR, the issue does not occur.
With the context provided I was not able to reproduce the issue
when testing defconfig + generic KASAN on the following kernels :
- v6.17-rc4
- v6.12.23 Upstream
- v6.12.23 Android[0]
- v6.12.23 Upstream, compiled with LLVM
- v6.12.23 Android[0], compiled with LLVM
(I tried to match the version that appears in your trace)
I tested on both QEMU/KVM and hardware (AMD Seattle), by loading
and unloading an out-of-tree kernel module repeatedly (an APFS driver[1]),
with no issues on either for all tested kernels.
>
> We are not certain which specific patch introduced this issue, but we
> have confirmed that it does not occur on the Android common kernel 6.1
> The problem was first observed after upgrading to 6.6-based kernels.
>
> Any suggestions or guidance would be appreciated.
> Thank you.
There's not much information to go off of here, my questions would be :
- Are you able to reproduce on an upstream kernel ?
(Be it from kernel.org or a "base" Android kernel, like [0])
- Are you able to reproduce under publicly available emulators ?
- Are you able to reproduce with specific, public modules ?
(Something available in Debian[2] for example)
- Which compiler and version are you using ?
It is a bit of work, I'm aware, but given I didn't manage to reproduce
the issue, it would be useful to have as much info on the context
so either we might be able to reproduce, or you might be able to
pinpoint the source on your side a bit better !
I have not seen any other reports since yours, nor did I see any patch/fix
that seemed relevant, so I don't have much more to suggest sadly ;
others might.
> Best Regards,
>
>
> 林群崴 (Qun-wei Lin)
> Qun-wei.Lin@...iatek.com
Thanks in advance,
Best regards
Ada
[0]:
https://android.googlesource.com/kernel/common/+/refs/tags/android16-6.12-2025-06_r5
[1]: https://github.com/linux-apfs/linux-apfs-rw/
[2]:
https://packages.debian.org/search?keywords=-dkms&searchon=names&suite=trixie§ion=all
Powered by blists - more mailing lists