Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAujs-000Z0w-0s for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 19:08:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAuip-007Ob2-2D for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 19:07:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAuip-007OZP-0x for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2026 19:07:24 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wAuio-00000000EJq-0G11 for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2026 19:07:23 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 65FD65ADCBE for ; Thu, 09 Apr 2026 21:07:20 +0200 (CEST) Received: from s980.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 529075ADBC7; Thu, 09 Apr 2026 21:07:20 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s980.loopia.se (Postfix) with ESMTP id 5107722015E3; Thu, 09 Apr 2026 21:07:20 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s470.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.6]) by localhost (s470.loopia.se [172.22.190.34]) (amavis, port 10024) with LMTP id T8dsHweqy6YY; Thu, 9 Apr 2026 21:07:20 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 217.159.201.219 Received: from smtpclient.apple (219-201-159-217.sta.estpak.ee [217.159.201.219]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id D26F310BC3A2; Thu, 09 Apr 2026 21:07:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1775761639; bh=4Cv8tqzTSqrWaACXK7QyqyqdLLIABurMg/VG2nsCYTE=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=gB9y7gq0kwsmJDBdJ0Ebi6z/728ptGTTLFSjwPGUomFQLFuy21jNhZtCQEV99zlm5 i66tXUTknYvcKDLFDoEz4OAYQWiQA53t2V8DGCoEDyxtr9Kpa1FTCka1tShmRGBnQJ M4MzZRWORDnlIN/nJ+fhRBgG+fNxyVJtT63oEf4nYMn2nzwyrXVKg92xZNtI+G+IIR vlXy+rDta/OzeEGDnWNST4vlmVzrGH/Xm+FmIm4IWl2GjHDtPWIfb2p8svqz9Q7PZ2 pN5eihRZSoZbM45dtEWLfiST8lvJnTZlyqAOcViA+MnRMBD4nIi95zLB502W+gYyoI 97g9bqr0RNqMw== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: pgcrypto: remove useless px_memset() and BF_ASM From: Daniel Gustafsson In-Reply-To: <87ldew2yqu.fsf@wibble.ilmari.org> Date: Thu, 9 Apr 2026 22:07:09 +0300 Cc: pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <9B96C179-32FA-4715-BC26-4E31D9EFF3A2@yesql.se> References: <87ldew2yqu.fsf@wibble.ilmari.org> To: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 9 Apr 2026, at 13:51, Dagfinn Ilmari Manns=C3=A5ker = wrote: > In the thread about centralised architecture detection, I noticed that > the BF_ASM macro in crypt-blowfish.c has never been defined to = anything > but 0, and the _BF_body_r() function it would call has never existed, = so > that can be got rid of. Agreed. I didn't do enough archaeology to figure out what upstream = has/had or why it was removed, but it's been dead for 25 odd years so it's about = time to remove. > While investigating at that, I also noticed that px_memset(), which = has > the comment /* memset that must not be optimized away */, is only ever > called with zero for the value, which could be better written with > explicit_bzero() now that we have that. One could imagine various tricks for rewriting px_memset to = explicit_bzero in order to reduce the churn, but since this code is very rarely = backpatched into it's not a big problem IMHO. I'll have another look with fresh eyes once back in the office. -- Daniel Gustafsson