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]
Date: Tue, 18 Jun 2024 11:30:07 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: dwarves@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	bpf@...r.kernel.org, Alan Maguire <alan.maguire@...cle.com>,
	Jiri Olsa <jolsa@...nel.org>, Jan Engelhardt <jengelh@...i.de>,
	Matthias Schwarzott <zzam@...too.org>,
	Viktor Malik <vmalik@...hat.com>,
	Eduard Zingerman <eddyz87@...il.com>,
	Jan Alexander Steffens <heftig@...hlinux.org>,
	Domenico Andreoli <cavok@...ian.org>,
	Dominique Leuenberger <dimstar@...nsuse.org>,
	Daniel Xu <dxu@...uu.xyz>, Yonghong Song <yonghong.song@...ux.dev>,
	llvm@...ts.linux.dev
Subject: [PATCH fyi 1/1] dwarf_loader: Add missing cus__add(cus, cu) to
 cus__merge_and_process_cu()

Just FYI, I added this on top of the previous one initializing cu->node.

Tested with that cast_common.ko and the vmlinux you made available.

- Arnaldo

---

In cus__finalize() if cu__finalize() returns LSK__DELETE, i.e. if the
tool processing the cu is done with it, we will assume that it is in the
cus list of cu instances, remove it and then delete it.

This was not being done by cus__merge_and_process_cu(), used when
merging all DWARF CUs into a single 'struct cu', such as when processing
binaries generated by clang using LTO. Add the missing cus__add() to
keep cus->nr_entries consistent.

Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 dwarf_loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dwarf_loader.c b/dwarf_loader.c
index b832c93cc2194eaf..3caf32457f42ec2e 100644
--- a/dwarf_loader.c
+++ b/dwarf_loader.c
@@ -3452,6 +3452,7 @@ static int cus__merge_and_process_cu(struct cus *cus, struct conf_load *conf,
 			cu->priv = dcu;
 			cu->dfops = &dwarf__ops;
 			cu->language = attr_numeric(cu_die, DW_AT_language);
+			cus__add(cus, cu);
 		}
 
 		Dwarf_Die child;
-- 
2.45.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ