lkml.org 
[lkml]   [2022]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 06/32] kasan: introduce kasan_print_aux_stacks
    On Mon, 13 Jun 2022 at 22:16, <andrey.konovalov@linux.dev> wrote:
    >
    > From: Andrey Konovalov <andreyknvl@google.com>
    >
    > Add a kasan_print_aux_stacks() helper that prints the auxiliary stack
    > traces for the Generic mode.
    >
    > This change hides references to alloc_meta from the common reporting code.
    > This is desired as only the Generic mode will be using per-object metadata
    > after this series.
    >
    > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    > ---
    > mm/kasan/kasan.h | 6 ++++++
    > mm/kasan/report.c | 15 +--------------
    > mm/kasan/report_generic.c | 20 ++++++++++++++++++++
    > 3 files changed, 27 insertions(+), 14 deletions(-)
    >
    > diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
    > index aa6b43936f8d..bcea5ed15631 100644
    > --- a/mm/kasan/kasan.h
    > +++ b/mm/kasan/kasan.h
    > @@ -265,6 +265,12 @@ void kasan_print_address_stack_frame(const void *addr);
    > static inline void kasan_print_address_stack_frame(const void *addr) { }
    > #endif
    >
    > +#ifdef CONFIG_KASAN_GENERIC
    > +void kasan_print_aux_stacks(struct kmem_cache *cache, const void *object);
    > +#else
    > +static inline void kasan_print_aux_stacks(struct kmem_cache *cache, const void *object) { }
    > +#endif

    Why not put this into one of the existing "#ifdef
    CONFIG_KASAN_GENERIC" blocks? There are several; probably the one 10
    lines down might be ok?

    \
     
     \ /
      Last update: 2022-06-17 13:37    [W:2.993 / U:0.224 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site