On Wed, Feb 26, 2025 at 03:31:03PM +0800, Huacai Chen wrote: > On Wed, Feb 26, 2025 at 4:41 AM Kees Cook <kees@xxxxxxxxxx> wrote: > > > > On Tue, Feb 25, 2025 at 07:35:13PM +0800, Huacai Chen wrote: > > > I have investigated deeper, and then found it is an arch-specific > > > problem (at least for LoongArch), and the correct solution is here: > > > https://lore.kernel.org/loongarch/20250225111812.3065545-1-chenhuacai@xxxxxxxxxxx/T/#u > > > > Ah-ha, so it seems like some system start was being incorrectly shared > > between restoration image and hibernated image? Yeah, that's important > > to fix. > > > > > But I don't know how to fix arm64. > > > > Is arm64 broken in this same way? > ARM64 is broken but I don't know whether it is in the same way, I just > know this patch can solve ARM64's problem: > https://lore.kernel.org/linux-mm/CAAhV-H7i=WJmdFCCtY5DgE2eN657ddJwJwHGK1jgLKRte+VnEg@xxxxxxxxxxxxxx/T/#m6ca3bd9fd3fe519161f28715279d0dc371027506 Let's Cc ARM folks :) A bit of context: LoongArch and ARM64 crash when resuming from hibernation if CONFIG_RANDOM_KMALLOC_CACHES=y. Initially it was argued that kmalloc randomization should be disabled during early boot. Kees and Rafael thinks [1] randomization features should not be the root cause of the bug. Later, Huacai fixed [2] the issue on LoongArch side by addressing LoongArch-specific problem. A similar crash related to the kmalloc randomization feature was reported [3] on a ARM64-based laptop. ARM64 might be broken in a similar way, but we don't know for sure yet. [1] https://lore.kernel.org/linux-mm/CAJZ5v0hZZdRPwp=OgPw4w8r9X=VbL6Hn6R4ZX6ZujNhBmMV3_A@xxxxxxxxxxxxxx/ [2] https://lore.kernel.org/loongarch/20250225111812.3065545-1-chenhuacai@xxxxxxxxxxx/T/#u [3] https://lore.kernel.org/linux-mm/CAAhV-H7i=WJmdFCCtY5DgE2eN657ddJwJwHGK1jgLKRte+VnEg@xxxxxxxxxxxxxx/T/#m6ca3bd9fd3fe519161f28715279d0dc371027506 > Huacai > > > > > -- > > Kees Cook -- Cheers, Harry