Re: using explicit_bzero

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: using explicit_bzero
Date: 2019-09-17 09:10:16
Message-ID: f7b5f301-b128-9269-fe1c-269a7cc0c257@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-09-09 17:18, Andres Freund wrote:
> I think all this implementation actually guarantees is that bzero2 is
> read, but not that the copy is not elided. In practice that's *probably*
> good enough, but a compiler could just check whether bzero_p points to
> memset.

Are you saying that the replacement implementation we provide is not
good enough? If so, I'm happy to look at alternatives. But that's the
design from OpenSSH, so if that is wrong, then there are bigger
problems. We could also take the OpenBSD implementation, but that has a
GCC-ish dependency, so we would probably want the OpenSSH implementation
as a fallback anyway.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-09-17 09:21:38 Re: block-level incremental backup
Previous Message Richard Guo 2019-09-17 08:41:34 Re: Pulling up direct-correlated ANY_SUBLINK