Thread (14 messages) flat view 14 messages, 2 authors, 2021-03-08

Re: [PATCH 3/5] kasan, mm: integrate page_alloc init with HW_TAGS

From: Andrey Konovalov <hidden>
Date: 2021-03-08 14:15:05
Also in: linux-mm, lkml

On Mon, Mar 8, 2021 at 12:35 PM Marco Elver [off-list ref] wrote:
quoted
-     kasan_free_nondeferred_pages(page, order, fpi_flags);
+     init = want_init_on_free();
+     if (init && !IS_ENABLED(CONFIG_KASAN_HW_TAGS))
Doing the !IS_ENABLED(CONFIG_KASAN_HW_TAGS) check is awkward, and
assumes internal knowledge of the KASAN implementation and how all
current and future architectures that support HW_TAGS work.

Could we instead add a static inline helper to <linux/kasan.h>, e.g.
kasan_supports_init() or so?

That way, these checks won't grow uncontrollable if a future
architecture implements HW_TAGS but not init.
Good idea, I'll add a helper in v2.
Hmm, KASAN certainly "supports" memory initialization always. So maybe
"kasan_has_accelerated_init()" is more accurate?  I leave it to you to
decide what the best option is.
Let's call it kasan_has_integrated_init().

Thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help