Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEdKp-0005ea-9f for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 14:36:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEdKo-0001vY-Mm for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 14:36:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEdJO-0000Ex-SX for pgsql-hackers@postgreSQL.org; Wed, 07 Dec 2016 14:35:10 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEdJE-0000sA-2K for pgsql-hackers@postgreSQL.org; Wed, 07 Dec 2016 14:35:10 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BDDE55F7A4; Wed, 7 Dec 2016 09:33:57 -0500 (EST) Date: Wed, 7 Dec 2016 09:33:57 -0500 From: Stephen Frost To: Peter Eisentraut Cc: Tom Lane , pgsql-hackers@postgreSQL.org Subject: Re: Back-patch use of unnamed POSIX semaphores for Linux? Message-ID: <20161207143357.GX23417@tamriel.snowman.net> References: <32387.1481079186@sss.pgh.pa.us> <722c489e-810a-be9c-f005-3b6bdcb4c59f@2ndquadrant.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IFrzt5yFNjsAZ17G" Content-Disposition: inline In-Reply-To: <722c489e-810a-be9c-f005-3b6bdcb4c59f@2ndquadrant.com> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 09:25:48 up 151 days, 15:50, 30 users, load average: 0.00, 0.04, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --IFrzt5yFNjsAZ17G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable All, * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: > On 12/6/16 9:53 PM, Tom Lane wrote: > > I think we should give serious consideration to back-patching commit > > ecb0d20a9, which changed the default semaphore type to unnamed-POSIX > > on Linux. >=20 > Even with that change, dynamic shared memory is still vulnerable to be > removed. So backpatching the semaphore change wouldn't achieve any new > level of safety for users so that we could tell them, "you're good now". I tend to agree with Peter, Magnus, and Craig on this. If you aren't running PG as a system user on a system where systemd feels happy to kill processes and remove shared memory segments and semaphores when you log out, no amount of back-patching of anything is going to make you 'safe'. As noted in the thread referenced, users who are trying to (mistakenly) do this are already having to modify their logind.conf file to not have PG outright killed when they log out, it's on them to make sure systemd doesn't do other stupid things when they log out too if they really want PG to be run as their user account. Thanks! Stephen --IFrzt5yFNjsAZ17G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYSB3VAAoJEO1sijiDR2RVzu4P/AxyjgYEl1RK/ddmMzFLTlyH v+oBMifcI9CL7vGlryTF+Zcl8DvsR13je61TZtCzjI43yWFBNbVBq4KQuyFytOMG S8jIGWyBTcDd7u8v+HsTuVH8HRSXrzBuXD/vWaRI9E6iObUXJZNDyOvLo38JTPW6 7eD6+jfxefjfkALH/auvdfiSIP0zv3q1HhIVNzvcdDBTwtxUqJ2S9lFVNDkVKnVC uyVl2J3p2HU8Z15/gFvtsdT+s0oiY2CpNV+owz5+z9x6PCGGas5Klj53WJPEShkZ W9OTcO3XgDXOHqnr3UhAA46EmUhPEWt8LHSUWw1sJFxZv/Y8WlnXsGeEq8Ss6yc5 j1gwCpDVwm4fWcE0voJ1SMOBlONu55REYx6cLxzz/k8ZVEZT4LKp1FaBqJflzOIT 0URbdJEINM4CpHFnYJQeb5ne5OyNufFKxsfcS6DWI95ZlRaqYT1rexzxOds9dg/K s9JGYdDTCmxX2XP+7CtRTb/dkgSvZ1R2mZv8RkjlkaSIDTNNYX4kbSpfg/xRiIXQ XEHgnvbUqpyl9TWhAdk4VZaMP/mhK/xRYQ4jXVL+MqYIMV1wblgz+K409reyEsOr Jc5sW1eGsMFWuFT9mSCkLS1x5Jk2y1QiE0P+nifKi+whPTgCxTJv/HkIX6psJIVL iuCNn2QVUiZGqmKz4AUt =jKFl -----END PGP SIGNATURE----- --IFrzt5yFNjsAZ17G--