From: Alexander A Sverdlin <alexander.sverdlin@nokia.com> To: kasan-dev@googlegroups.com Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>, Russell King <linux@armlinux.org.uk>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, Alexander Potapenko <glider@google.com>, Andrey Konovalov <andreyknvl@gmail.com>, Dmitry Vyukov <dvyukov@google.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: kasan: Fix compatibility with ARM_MODULE_PLTS Date: Fri, 6 May 2022 08:01:13 +0200 [thread overview] Message-ID: <20220506060113.14881-2-alexander.sverdlin@nokia.com> (raw) In-Reply-To: <20220506060113.14881-1-alexander.sverdlin@nokia.com> From: Alexander Sverdlin <alexander.sverdlin@nokia.com> Select KASAN_VMALLOC if KASAN && ARM_MODULE_PLT. Otherwise module load into vmalloc area crashes the kernel: Unable to handle kernel paging request at virtual address bce42b5c CPU: 1 PID: 454 Comm: systemd-udevd PC is at mmioset+0x7e/0xa0 LR is at kasan_unpoison_shadow+0x1b/0x24 Stack: (mmioset) from (kasan_unpoison_shadow+0x1b/0x24) (kasan_unpoison_shadow) from (__asan_register_globals+0x27/0x4c) (__asan_register_globals) from (do_init_module+0x13d/0x5b8) (do_init_module) from (load_module+0x6733/0x80f8) (load_module) from (sys_finit_module+0x119/0x140) (sys_finit_module) from (ret_fast_syscall+0x1/0x5a) Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f440cf5..d9d60a3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1519,6 +1519,7 @@ config HW_PERF_EVENTS config ARM_MODULE_PLTS bool "Use PLTs to allow module memory to spill over into vmalloc area" depends on MODULES + select KASAN_VMALLOC if KASAN default y help Allocate PLTs when loading modules so that jumps and calls whose -- 2.10.2
WARNING: multiple messages have this Message-ID (diff)
From: Alexander A Sverdlin <alexander.sverdlin@nokia.com> To: kasan-dev@googlegroups.com Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>, Russell King <linux@armlinux.org.uk>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, Alexander Potapenko <glider@google.com>, Andrey Konovalov <andreyknvl@gmail.com>, Dmitry Vyukov <dvyukov@google.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: kasan: Fix compatibility with ARM_MODULE_PLTS Date: Fri, 6 May 2022 08:01:13 +0200 [thread overview] Message-ID: <20220506060113.14881-2-alexander.sverdlin@nokia.com> (raw) In-Reply-To: <20220506060113.14881-1-alexander.sverdlin@nokia.com> From: Alexander Sverdlin <alexander.sverdlin@nokia.com> Select KASAN_VMALLOC if KASAN && ARM_MODULE_PLT. Otherwise module load into vmalloc area crashes the kernel: Unable to handle kernel paging request at virtual address bce42b5c CPU: 1 PID: 454 Comm: systemd-udevd PC is at mmioset+0x7e/0xa0 LR is at kasan_unpoison_shadow+0x1b/0x24 Stack: (mmioset) from (kasan_unpoison_shadow+0x1b/0x24) (kasan_unpoison_shadow) from (__asan_register_globals+0x27/0x4c) (__asan_register_globals) from (do_init_module+0x13d/0x5b8) (do_init_module) from (load_module+0x6733/0x80f8) (load_module) from (sys_finit_module+0x119/0x140) (sys_finit_module) from (ret_fast_syscall+0x1/0x5a) Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f440cf5..d9d60a3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1519,6 +1519,7 @@ config HW_PERF_EVENTS config ARM_MODULE_PLTS bool "Use PLTs to allow module memory to spill over into vmalloc area" depends on MODULES + select KASAN_VMALLOC if KASAN default y help Allocate PLTs when loading modules so that jumps and calls whose -- 2.10.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-06 6:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-06 6:01 [PATCH 1/2] ARM: kasan: Support CONFIG_KASAN_VMALLOC Alexander A Sverdlin 2022-05-06 6:01 ` Alexander A Sverdlin 2022-05-06 6:01 ` Alexander A Sverdlin [this message] 2022-05-06 6:01 ` [PATCH 2/2] ARM: kasan: Fix compatibility with ARM_MODULE_PLTS Alexander A Sverdlin
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=20220506060113.14881-2-alexander.sverdlin@nokia.com \ --to=alexander.sverdlin@nokia.com \ --cc=andreyknvl@gmail.com \ --cc=dvyukov@google.com \ --cc=glider@google.com \ --cc=kasan-dev@googlegroups.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=ryabinin.a.a@gmail.com \ --cc=vincenzo.frascino@arm.com \ /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: linkBe 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.