lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 14/19] lib/stackdepot, kasan: add flags to __stack_depot_save and rename
    On Fri, Sep 15, 2023 at 10:32 PM Marco Elver <elver@google.com> wrote:
    > > +depot_stack_handle_t stack_depot_save_flags(unsigned long *entries,
    > > + unsigned int nr_entries,
    > > + gfp_t alloc_flags,
    > > + depot_flags_t depot_flags)
    > > {
    > > struct list_head *bucket;
    > > struct stack_record *found = NULL;
    > > depot_stack_handle_t handle = 0;
    > > struct page *page = NULL;
    > > void *prealloc = NULL;
    > > + bool can_alloc = depot_flags & STACK_DEPOT_FLAG_CAN_ALLOC;
    > > bool need_alloc = false;
    > > unsigned long flags;
    > > u32 hash;
    > >
    > > + if (depot_flags & ~STACK_DEPOT_FLAGS_MASK)
    > > + return 0;
    > > +
    >
    > Shouldn't this be a WARN due to invalid flags?

    Good idea! Will fix. Thanks!

    \
     
     \ /
      Last update: 2023-09-16 01:44    [W:3.143 / U:0.520 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site