Thread (27 messages) 27 messages, 4 authors, 2021-01-21

Re: [PATCH v4 3/5] kasan: Add report for async mode

From: Andrey Konovalov <hidden>
Date: 2021-01-19 18:29:45
Also in: lkml

On Tue, Jan 19, 2021 at 3:46 PM Mark Rutland [off-list ref] wrote:
Given there's no information available, I think it's simpler and
preferable to handle the logging separately, as is done for
kasan_report_invalid_free(). For example, we could do something roughly
like:

void kasan_report_async(void)
{
        unsigned long flags;

        start_report(&flags);
        pr_err("BUG: KASAN: Tag mismatch detected asynchronously\n");
"BUG: KASAN: invalid-access"

It also might make sense to pass the ip, even though it's not exactly
related to the access:

pr_err("BUG: KASAN: invalid-access in %pS\n", (void *)ip);

Up to you.
        pr_err("KASAN: no fault information available\n");
pr_err("Asynchronous mode enabled: no access details available\n");
        dump_stack();
        end_report(&flags);
}
This approach with a dedicated function is better. Thanks, Mark!

Please put it next to kasan_report_invalid_free().

_______________________________________________
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