lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ecc3437-8895-c12a-ecaf-f9625fa3e364@oracle.com>
Date:   Wed, 15 Sep 2021 13:29:38 +1000
From:   imran.f.khan@...cle.com
To:     Vlastimil Babka <vbabka@...e.cz>, geert@...ux-m68k.org,
        akpm@...ux-foundation.org, ryabinin.a.a@...il.com,
        glider@...gle.com, andreyknvl@...il.com, dvyukov@...gle.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/2] lib, stackdepot: Add helper to print stack
 entries.



On 14/9/21 7:01 pm, Vlastimil Babka wrote:
> On 9/2/21 02:01, Imran Khan wrote:
>> To print a stack entries, users of stackdepot, first
>> use stack_depot_fetch to get a list of stack entries
>> and then use stack_trace_print to print this list.
>> Provide a helper in stackdepot to print stack entries
>> based on stackdepot handle.
>> Also change above mentioned users to use this helper.
>>

[...]
>>   
>> +/**
>> + * stack_depot_print - print stack entries from a depot
>> + *
>> + * @handle:		Stack depot handle which was returned from
>> + *			stack_depot_save().
>> + *
>> + */
>> +void stack_depot_print(depot_stack_handle_t stack)
>> +{
>> +	unsigned long *entries;
>> +	unsigned int nr_entries;
>> +
>> +	nr_entries = stack_depot_fetch(stack, &entries);
> 
> Maybe this should also skip stack_trace_print when nr_entries is 0, to avoid
> the warning. While the callers added by this patch check handle != 0, future
> ones might not.
> 
Agree. I have incorporated this suggestion in latest version [1]

[1] 
https://lore.kernel.org/lkml/20210915014806.3206938-1-imran.f.khan@oracle.com/

Thanks
   -- Imran

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ