pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Noah Misch <noah@leadboat.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: DSM segment handle generation in background workers
Date: Tue, 13 Nov 2018 23:52:18 -0800
Message-ID: <20181114075218.GE1096408@rfd.leadboat.com> (raw )
In-Reply-To: <CAEepm=2xEKGUWJadcqXUWQQDfPy-urJ3hgJT50Svj7n8e6st-A@mail.gmail.com >
References: <CAEepm=1xxETRCZexNSxkABpNg-65U6Z2pxynJ8V0vURqob+Rqw@mail.gmail.com >
<9879.1539233472@sss.pgh.pa.us >
<CAEepm=20PEf5bM3FAtD=CL7x0_WxFXfQ4Se9N9nConKucsr8pg@mail.gmail.com >
<20181112083358.GA1073796@rfd.leadboat.com >
<CAEepm=1+1jZiNHuRKaHgKZz1f=RFd8BnFpSgVsxEFNafjsqWZg@mail.gmail.com >
<32455.1542033541@sss.pgh.pa.us >
<20181114022435.GC1096408@rfd.leadboat.com >
<CAEepm=1COuNcj_va0Qt2KTEE4rDvhWCixZ-pyh8iUbrusEVBzQ@mail.gmail.com >
<20181114053412.GD1096408@rfd.leadboat.com >
<CAEepm=2xEKGUWJadcqXUWQQDfPy-urJ3hgJT50Svj7n8e6st-A@mail.gmail.com >
On Wed, Nov 14, 2018 at 08:22:42PM +1300, Thomas Munro wrote:
> On Wed, Nov 14, 2018 at 6:34 PM Noah Misch <noah@leadboat.com> wrote:
> > On Wed, Nov 14, 2018 at 05:50:26PM +1300, Thomas Munro wrote:
> > > On Wed, Nov 14, 2018 at 3:24 PM Noah Misch <noah@leadboat.com> wrote:
> > > > What counts is the ease of predicting a complete seed. HEAD's algorithm has
> > > > ~13 trivially-predictable bits, and the algorithm that stood in BackendRun()
> > > > from 98c5065 until 197e4af had no such bits. You're right that the other 19
> > > > bits are harder to predict than any given 19 bits under the old algorithm, but
> > > > the complete seed remains more predictable than it was before 197e4af.
> > >
> > > However we mix them, given that the source code is well known, isn't
> > > an attacker's job really to predict the time and pid, two not
> > > especially well guarded secrets?
> >
> > True. Better to frame the issue as uniform distribution of seed, not
> > unpredictability of seed selection.
>
> What do you think about the attached?
You mentioned that you rewrote the algorithm because the new function had a
TimestampTz. But the BackendRun() code, which it replaced, also had a
TimestampTz. You can reuse the exact algorithm. Is there a reason to change?
view thread (19+ messages) latest in thread
Message-ID: <20181114075218.GE1096408@rfd.leadboat.com>
Permalink: ../20181114075218.GE1096408@rfd.leadboat.com/
Also on: postgresql.org/message-id/20181114075218.GE1096408@rfd.leadboat.com
copy link · copy postgr.es
reply 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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com, thomas.munro@enterprisedb.com, tgl@sss.pgh.pa.us
Subject: Re: DSM segment handle generation in background workers
In-Reply-To: <20181114075218.GE1096408@rfd.leadboat.com>
* 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