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