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-next>] [day] [month] [year] [list]
Message-Id: <20250509061013.922944-1-00107082@163.com>
Date: Fri,  9 May 2025 14:10:13 +0800
From: David Wang <00107082@....com>
To: surenb@...gle.com,
	kent.overstreet@...ux.dev
Cc: akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: [BUG?]Data key in /proc/allocinfo is a multiset

Just start a new thread for this[1].
There are duplications in /proc/allocinfo where same [file:line]
shows up several times:

=======================
           0        0 ./include/crypto/kpp.h:185 func:kpp_request_alloc 
           0        0 ./include/crypto/kpp.h:185 func:kpp_request_alloc 
=======================
           0        0 ./include/net/tcp.h:2548 func:tcp_v4_save_options 
           0        0 ./include/net/tcp.h:2548 func:tcp_v4_save_options 
=======================
           0        0 drivers/iommu/amd/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/amd/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/amd/../iommu-pages.h:94 func:iommu_alloc_pages_node 
=======================
           0        0 drivers/iommu/intel/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/intel/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/intel/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/intel/../iommu-pages.h:94 func:iommu_alloc_pages_node 
           0        0 drivers/iommu/intel/../iommu-pages.h:94 func:iommu_alloc_pages_node 
...

The duplication make parsing tools a little bit more complicated:
the numbers need to be added up, group by key
       81920       20 drivers/iommu/amd/../iommu-pages.h:94 func:iommu_alloc_pages_node 20 
     1441792      352 drivers/iommu/amd/../iommu-pages.h:94 func:iommu_alloc_pages_node 352

The script for checking:
```
#!/bin/env python
def fetch():
    r = {}
    with open("/proc/allocinfo") as f:
        for l in f:
            f = l.strip().split()[2]
            if f not in r: r[f]=[]
            r[f].append(l)
    keys = []
    for f, ls in r.items():
        if len(ls) > 1: keys.append(f)
    keys.sort()
    for f in keys:
        print "======================="
        for l in r[f]: print l,

fetch()
```

Thanks
David

[1]. https://lore.kernel.org/lkml/531adbba.b537.196b0868a8c.Coremail.00107082@163.com/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ