Thread (107 messages) 107 messages, 6 authors, 2020-11-13

Re: [PATCH v9 17/44] kasan, arm64: move initialization message

From: Alexander Potapenko <glider@google.com>
Date: 2020-11-12 15:09:40
Also in: linux-mm, lkml

On Wed, Nov 11, 2020 at 7:50 PM Andrey Konovalov [off-list ref] wrote:
On Wed, Nov 11, 2020 at 4:04 PM Alexander Potapenko [off-list ref] wrote:
quoted
On Tue, Nov 10, 2020 at 11:11 PM Andrey Konovalov [off-list ref] wrote:
quoted
Software tag-based KASAN mode is fully initialized with kasan_init_tags(),
while the generic mode only requires kasan_init(). Move the
initialization message for tag-based mode into kasan_init_tags().

Also fix pr_fmt() usage for KASAN code: generic.c doesn't need it as it
doesn't use any printing functions; tag-based mode should use "kasan:"
instead of KBUILD_MODNAME (which stands for file name).

Signed-off-by: Andrey Konovalov <redacted>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
quoted
Cannot we have a single kasan_init() function that will call
tool-specific initialization functions and print the message at the
end?
Unfortunately no. For different modes we need different functions that
are called in different places in the kernel. E.g. for generic KASAN
we only need kasan_init() to setup shadow pages; for SW tags we also
need kasan_init_sw_tags() which initializes per-cpu state and
finilizes initialization process.
Ok, got it.

-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

_______________________________________________
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