From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
Date: Tue, 30 Aug 2022 14:07:41 -0400
Message-ID: <3713731.1661882861@sss.pgh.pa.us> (raw)
In-Reply-To: <20220830174116.mmhyi3rfysudybsx@awork3.anarazel.de>
References: <3384826.1661802235@sss.pgh.pa.us>
<20220830171720.iai6jwwo756z7ivw@awork3.anarazel.de>
<3705480.1661880279@sss.pgh.pa.us>
<20220830174116.mmhyi3rfysudybsx@awork3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2022-08-30 13:24:39 -0400, Tom Lane wrote:
>> Andres Freund <andres@anarazel.de> writes:
>>> Perhaps it'd be saner to default to building with -Wl,-z,now? That should fix
>>> the problem too, right (and if we combine it with relro, it'd be a security
>>> improvement to boot).
>> Hm. Not sure if that works on NetBSD, but I'll check it out.
> FWIW, it's a decently (well over 10 years) old thing I think. And it's documented in
> the netbsd ld manpage and their packaging guide (albeit indirectly, with their
> tooling doing the work of specifying the flags):
> https://www.netbsd.org/docs/pkgsrc/hardening.html#hardening.audit.relrofull
It does appear that they use GNU ld, and I've just finished confirming
that each of those switches has the expected effects on my PPC box.
So yeah, this looks like a better answer.
Do we want to install this just for NetBSD, or more widely?
I think we'd better back-patch it for NetBSD, so I'm inclined
to be conservative about the change.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
In-Reply-To: <3713731.1661882861@sss.pgh.pa.us>
References: <3384826.1661802235@sss.pgh.pa.us> <20220830171720.iai6jwwo756z7ivw@awork3.anarazel.de> <3705480.1661880279@sss.pgh.pa.us> <20220830174116.mmhyi3rfysudybsx@awork3.anarazel.de> <3713731.1661882861@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox