In message: [PATCH v5.15 00/14] kasan: fix "BUG: sleeping function called from invalid context" on 08/04/2022 Paul Gortmaker wrote:
> This "seen on -rt" issue was originally reported on v5.15-rc7, as per: > > https://lore.kernel.org/rcu/20211101103158.3725704-1-jun.m...@windriver.com/T/#u > > and to save you reading the whole long thread, it finally got mainline as > commit 300c0c5e7218 in v5.17. At a glance, the fix looks pretty simple and > applies to v5.15 so one wonders why it was only backported to v5.16-stable. > > Well, that becomes obvious as soon as one tries to compile it. The noalloc > variant - i.e. kasan_record_aux_stack_noalloc() only appeared in v5.16, as > part of a larger KASAN series fed in via the akpm patch-bomb in the merge > window prior to v5.16-rc1. > > Fortunately once one realizes that and then re-divorces the kasan content > from the monolithic akpm series, along with the associated dependencies > and related "Fixes:" everything simply applies hands-free with no fuss on > the older v5.15 and also builds. > > While the issue was seen on -rt, I don't see any evidence that it couldn't > happen on non-rt either. And since these are all mainline commits, I'd > suggest we put them on v5.15/standard/base and merge outwards. > > Tested KASAN=y + KASAN_VMALLOC=y as the latter is called out in one of the > commits as being fixed. Booted on non-rt defconfig for x86_64 and -rt on > our (Yocto's) qemu-arm64 base. Note that our default 256MB isn't enough for > KASAN_VMALLOC on qemu ARM64, so I bumped it to 2G for my testing. queud to 5.15/* Bruce > > Paul. > --- > > Jun Miao (1): > rcu: Avoid alloc_pages() when recording stack > > Kees Cook (2): > kasan: test: bypass __alloc_size checks > kasan: test: silence intentional read overflow warnings > > Kefeng Wang (3): > vmalloc: choose a better start address in vm_area_register_early() > arm64: support page mapping percpu first chunk allocator > kasan: arm64: fix pcpu_page_first_chunk crash with KASAN_VMALLOC > > Marco Elver (6): > lib/stackdepot: include gfp.h > lib/stackdepot: remove unused function argument > lib/stackdepot: introduce __stack_depot_save() > kasan: common: provide can_alloc in kasan_save_stack() > kasan: generic: introduce kasan_record_aux_stack_noalloc() > workqueue, kasan: avoid alloc_pages() when recording stack > > Matthew Wilcox (Oracle) (1): > kasan: fix tag for large allocations when using CONFIG_SLAB > > Peter Collingbourne (1): > kasan: test: add memcpy test that avoids out-of-bounds write > > arch/arm64/Kconfig | 4 ++ > arch/arm64/mm/kasan_init.c | 16 ++++++++ > drivers/base/arch_numa.c | 82 +++++++++++++++++++++++++++++++++----- > include/linux/kasan.h | 8 ++++ > include/linux/stackdepot.h | 6 +++ > kernel/rcu/tree.c | 4 +- > kernel/workqueue.c | 2 +- > lib/stackdepot.c | 52 +++++++++++++++++++----- > lib/test_kasan.c | 28 ++++++++++++- > lib/test_kasan_module.c | 2 + > mm/kasan/common.c | 8 ++-- > mm/kasan/generic.c | 14 ++++++- > mm/kasan/kasan.h | 2 +- > mm/kasan/shadow.c | 5 +++ > mm/vmalloc.c | 19 ++++++--- > 15 files changed, 213 insertions(+), 39 deletions(-) > > -- > 2.17.1 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11166): https://lists.yoctoproject.org/g/linux-yocto/message/11166 Mute This Topic: https://lists.yoctoproject.org/mt/90342141/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-