From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 48F2B3858D33 for ; Tue, 7 Feb 2023 19:47:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48F2B3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 317JM0Av028239; Tue, 7 Feb 2023 19:46:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=8G1c53kKKS3hnbaF+ZseJJLnnZfMfe95tdmUM6Cu6fg=; b=Mbmj75h7mpds7ki0bX3hdEhtZomxOf444Wi2CUiRUW/EtEaD6JJxT5wU0zKfw9eO8vXs TkBrUJ+kKIIkZ9oqcDv+WOaMMXLOL2rez7lf0z/rsYeAih4knXdBZXomg1FB4jt7fQ/K OiwE63EssUm2Hfmk4WaLofGMWxQM31k+k4bi3TYzvxKdYSjBnFeOYnayVwX8uEiSJyln AUuwKhXz7nKnjYiz94daQZ+hcNCvmZX3bwkQiXiodrzzEDqB8dZI0EeBxBWQGFSYWVv/ /z1pZhi0z4T+tRmMDUZ34gHjlWI21JSgEoC4Ad4TmLlZvTNx84vCR/XyjnTHzqoZwbCa XA== Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nkvqxgp9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 19:46:58 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 317Erp2H005776; Tue, 7 Feb 2023 19:46:56 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3nhf06jtgy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 19:46:55 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 317JkrRa46989816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Feb 2023 19:46:53 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 822702004D; Tue, 7 Feb 2023 19:46:53 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3EA6420043; Tue, 7 Feb 2023 19:46:53 +0000 (GMT) Received: from [9.179.25.234] (unknown [9.179.25.234]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Feb 2023 19:46:53 +0000 (GMT) Message-ID: <6e576e707fa3da14f4e9045cbf53ba887823a543.camel@linux.ibm.com> Subject: Re: [PATCH RFC 00/11] Add Memory Sanitizer support From: Ilya Leoshkevich To: Mark Wielaard Cc: elfutils-devel@sourceware.org Date: Tue, 07 Feb 2023 20:46:52 +0100 In-Reply-To: <20230207190516.GA25444@gnu.wildebeest.org> References: <20230206222513.1773039-1-iii@linux.ibm.com> <20230207190516.GA25444@gnu.wildebeest.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: PiwCgF0fsfKMCfA3pf-dXO84UxxeqXfK X-Proofpoint-GUID: PiwCgF0fsfKMCfA3pf-dXO84UxxeqXfK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-07_11,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 mlxlogscore=595 clxscore=1011 mlxscore=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302070172 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-02-07 at 20:05 +0100, Mark Wielaard wrote: > Hi Ilya, >=20 > On Mon, Feb 06, 2023 at 11:25:02PM +0100, Ilya Leoshkevich via > Elfutils-devel wrote: > > This series adds minimalistic support for Memory Sanitizer (MSan) > > [1]. > > MSan is compiler instrumentation for detecting accesses to > > uninitialized memory. [...] > > - Minimal configuration of elfutils instrumented with MSan: > >=20 > > =C2=A0 autoreconf -i > > =C2=A0 CC=3Dclang ./configure --enable-maintainer-mode \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --enable-sa= nitize-memory --without-bzlib \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --without-l= zma --without-zstd \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --disable-d= ebuginfod --disable-libdebuginfod > > \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --disable-d= emangler >=20 > Aren't there instrumented versions of bzip2, lzma/xz and/or zstd? >=20 > Can't debuginfod and libdebuginfod be instrumented? >=20 > Is the demangler disabled because you don't link against (an > instrumented) libstdc++? I think with some effort instrumenting the dependencies is possible. bzlib and lzma are not particularly large, and zstd should support this out of the box. Regarding C++, an instrumented LLVM's libc++ should also just work. With all this, it should be possible to test elfutils with MSan without disabling the extra functionality. But since you already test with valgrind, I figured it would be highly unlikely that I find new bugs, and decided to limit the scope here. For my current purposes - linking elfutils into libbpf - this proved to be enough. [...] Best regards, Ilya