On Wed, Mar 2, 2022 at 5:37 PM wrote: > From: Andrey Konovalov > > Currently, end_report() does not call trace_error_report_end() for bugs > detected in either async or asymm mode (when kasan_async_fault_possible() > returns true), as the address of the bad access might be unknown. > > However, for asymm mode, the address is known for faults triggered by > read operations. > > Instead of using kasan_async_fault_possible(), simply check that > the addr is not NULL when calling trace_error_report_end(). > > Signed-off-by: Andrey Konovalov > --- > mm/kasan/report.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c > index d60ee8b81e2b..2d892ec050be 100644 > --- a/mm/kasan/report.c > +++ b/mm/kasan/report.c > @@ -112,7 +112,7 @@ static void start_report(unsigned long *flags) > > static void end_report(unsigned long *flags, unsigned long addr) > { > - if (!kasan_async_fault_possible()) > + if (addr) > trace_error_report_end(ERROR_DETECTOR_KASAN, addr); > What happens in the case of a NULL dereference? Don't we want to trigger the tracepoint as well? -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.