Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpd9w-0001Wr-02 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 18:35:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpd9u-0001hX-Rr for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 18:35:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpd9u-0001hQ-FX for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 18:35:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hpd9r-0000Vk-R0 for pgsql-hackers@postgresql.org; Mon, 22 Jul 2019 18:35:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6MIZWJ5009904; Mon, 22 Jul 2019 14:35:32 -0400 From: Tom Lane To: Peter Eisentraut cc: Alvaro Herrera , Thomas Munro , pgsql-hackers Subject: Re: using explicit_bzero In-reply-to: <2751372e-e443-479a-0403-c414eae8e14e@2ndquadrant.com> References: <20190717211931.GA906@alvherre.pgsql> <25152.1563403539@sss.pgh.pa.us> <2751372e-e443-479a-0403-c414eae8e14e@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Mon, 22 Jul 2019 20:17:17 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9902.1563820532.1@sss.pgh.pa.us> Date: Mon, 22 Jul 2019 14:35:32 -0400 Message-ID: <9903.1563820532@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 2019-07-18 00:45, Tom Lane wrote: >> +1 for using the C11-standard name, even if that's not anywhere >> in the real world yet. > ISTM that a problem is that you cannot implement a replacement > memset_s() as a wrapper around explicit_bzero(), unless you also want to > implement the bound checking stuff. (The "s"/safe in this family of > functions refers to the bound checking, not the cannot-be-optimized-away > property.) The other way around it is easier. Oh, hm. > Also, the "s" family of functions appears to be a quagmire of > controversy and incompatibility, so it's perhaps better to stay away > from it for the time being. Fair enough. regards, tom lane