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: <cef588b9-ad70-e840-7cc6-f1896ccfcbbf@siemens.com>
Date:   Tue, 5 Jan 2021 20:08:22 +0100
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     George Prekas <prekageo@...zon.com>,
        Kieran Bingham <kbingham@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] scripts/gdb: fix list_for_each

On 05.01.21 17:51, George Prekas wrote:
> On 9/24/2020 9:20 AM, George Prekas wrote:
>> If the list is uninitialized (next pointer is NULL), list_for_each gets
>> stuck in an infinite loop. Print a message and treat list as empty.
>>
>> Signed-off-by: George Prekas <prekageo@...zon.com>
>> ---
>>  scripts/gdb/linux/lists.py | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/scripts/gdb/linux/lists.py b/scripts/gdb/linux/lists.py
>> index c487ddf09d38..bae4d70b7eae 100644
>> --- a/scripts/gdb/linux/lists.py
>> +++ b/scripts/gdb/linux/lists.py
>> @@ -27,6 +27,11 @@ def list_for_each(head):
>>          raise TypeError("Must be struct list_head not {}"
>>                             .format(head.type))
>>
>> +    if head['next'] == 0:
>> +        gdb.write("list_for_each: Uninitialized list '{}' treated as
>> empty\n"
>> +                     .format(head.address))
>> +        return
>> +
>>      node = head['next'].dereference()
>>      while node.address != head.address:
>>          yield node.address
> 
> Happy New Year!

Same to you!

> 
> Any updates on this?
> 

Sorry, slipped through.

Reviewed-by: Jan Kiszka <jan.kiszka@...mens.com>

Andrew, please pick this up.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ