From nobody Thu Feb 22 08:47:29 2024 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgRbx5H79z5CC2F for ; Thu, 22 Feb 2024 08:47:41 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgRbx4Tx2z4Wrb; Thu, 22 Feb 2024 08:47:41 +0000 (UTC) (envelope-from theraven@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708591661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XSHyNwklqsDSYidylJoanxHZCyPzS8BYWczgQfyi3ks=; b=XDUoMyvyaM/7bjRK9u2QEcJQRxX1bykqbCz8mCLZcdoLf7UIrPFrqErJ/PJG1RNCQ2LRbb OJzDJsPs3KkVtbLVQunEejh+4sq+QA3iOlDJSvVZo6G64BCvb0/UURoP4POkcKnqMC6ND+ 414JiPGbknrbdv5twVSRlWG/qusjEU5KkCM1tUF7SGW1HlLcU4sUaBTCvFBXlEPrS7jzKY OIEy8HeFnT8yeyq14efcH+y21qE07TKe7EXr1/e/60/X9XS5aaC7eWcL5eyFXPi+jK5mAq HqQyLa1hRAJsoeL0HO6NssBtLtMWk0o0O1VzPYnxncSQD2BuM3byodadVzA2Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708591661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XSHyNwklqsDSYidylJoanxHZCyPzS8BYWczgQfyi3ks=; b=QvYNFB/rFbw2yxUGg07NVDJf63U728gdyfNbvJnDN7ww+Yy6h9KgmMOJ0i4HjbbotiO6I1 p2Rs744N+c7vdUrP2BDtpVRIBQzDh5xl1oFhnnjwGy60OVp1PaCB/3pqls1naclNUmdrqg +WYMQk1E0aVB7tjfzR0JICdp35Z8Amzs5ym6CD6K/THnZeXkiQJOR70fQEXb3B8s08HQRh kkEiYRbsoZbIeArqoE4DZvRMomqEaKk/2bMV0EJ334BLzu6n6VsCupr5Q1x4Yz/d9KYBlE A5opa74ZfpVmhTCFCkSMvrI7PtlT46K9PwzATr5YNb6aqAZrsabWsuMFAS/GZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708591661; a=rsa-sha256; cv=none; b=jc7V8Es+5YM3OUyMS6TclwP7AoH2bqh/MecPYObiqrtv808lfXsDEF3Hq3RA4YUKOgCyte It1932AoaV6e49r03dwF/Kx8CCB+ISgUOLfb3XfeqMpvqF9PAyaQR0CSyiUnhD54XUYTcO /UyomgwDw/0qKOw7d5yOTaPW0EABYAgWEoNiHVDHjDM9oKN2bWjQdJ+9C0Fst6YRyvmZhN s8w4gv/dEHhKYskQQIbLIioS0yTpxW9f6BuqTEa9w35l9Yc8bL1TUEedfR7bQ7R8LptXIw Hanj+62fX6Kt4OVk73OhGdmnyBufF5+Ip2wD10GrJnZHj1tMojtkcJhz6Re35A== Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TgRbx3VqWz1Ltt; Thu, 22 Feb 2024 08:47:41 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from smtpclient.apple (host86-131-178-116.range86-131.btcentralplus.com [86.131.178.116]) by smtp.theravensnest.org (Postfix) with ESMTPSA id 09B2890C8; Thu, 22 Feb 2024 08:47:41 +0000 (GMT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: David Chisnall List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: sanitizers broken (was RE: libc/libsys split coming soon) Date: Thu, 22 Feb 2024 08:47:29 +0000 Message-Id: References: Cc: Hartmut.Brandt@dlr.de, current@freebsd.org In-Reply-To: To: Brooks Davis X-Mailer: iPad Mail (21C62) On 21 Feb 2024, at 20:00, Brooks Davis wrote: >=20 > The sanitizers reach somewhat questionably into libc internals that are > exported to allow rtld to update them. I was unable to find an solution > that didn't break this and I felt that fixing things like closefrom() > using non-deprecated syscalls was more important than avoiding changes > to the sanitizer interface. On Darwin, Apple added a special __interpose section that contains pairs of f= unctions to be replaced and replacements. Within the library supplying the i= nterposer, the symbol is resolved to the next version along, but everything t= hat links to the interposing library sees the wrapped version. I wonder if it=E2=80=99s worth teaching rtld to do something equivalent. It=E2= =80=99s a fairly lightweight generic mechanism that avoids a lot of the hack= s that the sanitisers (and other things, such as instrumented malloc wrapper= s) do. David=