lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kasan:fix access invalid shadow address when input is illegal
On Fri, Sep 15, 2023 at 4:46 AM 'Haibo Li' via kasan-dev
<kasan-dev@googlegroups.com> wrote:
>
> The patch checks each shadow address,so it introduces extra overhead.

Ack. Could still be fine, depends on the overhead.

But if the message printed by kasan_non_canonical_hook is good enough
for your use case, I would rather stick to that.

> Now kasan_non_canonical_hook only works for CONFIG_KASAN_INLINE.
>
> And CONFIG_KASAN_OUTLINE is set in my case.
>
> Is it possible to make kasan_non_canonical_hook works for both
> INLINE and OUTLINE by simply remove the "#ifdef CONFIG_KASAN_INLINE"?

Yes, it should just work if you remove the ifdefs in mm/kasan/report.c
and in include/linux/kasan.h.

Jann, do you have any objections to enabling kasan_non_canonical_hook
for the outline mode too?

> Since kasan_non_canonical_hook is only used after kernel fault,it
> is better if there is no limit.

\
 
 \ /
  Last update: 2023-09-15 18:52    [W:0.214 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site