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: <CAK8P3a0z4FV5Y7XqMPzJ_WpPAx+pqr9OVR9JKm2+6ramSiqAsw@mail.gmail.com>
Date:   Thu, 22 Feb 2018 16:50:36 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Waiman Long <longman@...hat.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Yang Shi <yang.shi@...ux.alibaba.com>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugobjects: fix debug_objects_freed accounting

On Thu, Feb 22, 2018 at 2:58 PM, Waiman Long <longman@...hat.com> wrote:
> On 02/22/2018 06:45 AM, Arnd Bergmann wrote:
>> The removal of the batched object freeing has caused the debug_objects_freed
>> to become read-only, and the reading is inside an ifdef, so gcc warns that it
>> is completely unused without CONFIG_DEBUG_FS:
>>
>> lib/debugobjects.c:71:14: error: 'debug_objects_freed' defined but not used [-Werror=unused-variable]
>>
>> Assuming we are still interested in this number, this adds back code to
>> count every instance we are about to free while we still hold the spinlock.
>>
>> Fixes: 636e1970fd7d ("debugobjects: Use global free list in free_object()")
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> ---
>>  lib/debugobjects.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
>> index faab2c4ea024..748288dba512 100644
>> --- a/lib/debugobjects.c
>> +++ b/lib/debugobjects.c
>> @@ -235,6 +235,9 @@ static void free_obj_work(struct work_struct *work)
>>               hlist_move_list(&obj_to_free, &tofree);
>
> It would be simpler to just do:
>                debug_objects_freed += obj_nr_tofree;
>

Right, I missed that, sending v2 now.

Thanks for the review!

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ