pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robbie Harwood <rharwood@redhat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: David Steele <david@pgmasters.net>
Cc: Joe Conway <mail@joeconway.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Nico Williams <nico@cryptonector.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH v20] GSSAPI encryption support
Date: Thu, 04 Apr 2019 13:14:32 -0400
Message-ID: <jlgv9ztr8uf.fsf@redhat.com> (raw)
In-Reply-To: <7566.1554391003@sss.pgh.pa.us>
References: <1f799b02-d766-0328-45d6-73e5674d0bc2@2ndquadrant.com>
	<CAOuzzgprZ7-gYkzwkPzMOPka62irppKpXNm219q7a_8Fu33TLw@mail.gmail.com>
	<500b1be7-d0aa-96a2-9982-d748609faff5@joeconway.com>
	<CABUevEyuNNJv=19foa=ycTfTfBUYOEwM8_Uss5OVKrwBAy+Btw@mail.gmail.com>
	<20190403144332.GD6197@tamriel.snowman.net>
	<7b7035e0-3691-ca63-0957-25d17dc11514@2ndquadrant.com>
	<CAOuzzgrztzi+g5vfd-dtNxx+MByZcy9nMVzavYZTgvZGHx98Hg@mail.gmail.com>
	<5406.1554388830@sss.pgh.pa.us>
	<20190404144818.GI6197@tamriel.snowman.net>
	<5945.1554389568@sss.pgh.pa.us>
	<20190404150054.GJ6197@tamriel.snowman.net>
	<7566.1554391003@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> Stephen Frost <sfrost@snowman.net> writes:
>> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>>> Well, if the caller thinks what is being passed back is an int,
>>> it will do a 32-to-64-bit widening, which is almost certainly
>>> going to result in a corrupted pointer.
>
>> Oh, good point.  Interesting that it still works then.
>
> There must be something about the x86_64 ABI that allows this to
> accidentally work -- maybe integers are presumed to be sign-extended
> to 64 bits by callee not caller?  I added some logging and verified
> that pgstat.c is seeing the correct string value, so it's working
> somehow.
>
>> I've got a fix for the missing prototypes, I hadn't noticed the issue
>> previously due to always building with SSL enabled as well.
>
> Yeah, I'd just come to the conclusion that it's because I didn't
> include --with-openssl, and libpq-be.h's #ifdef nest doesn't expect
> that.
>
> BTW, the kerberos test suite takes nearly 4 minutes for me, is
> it supposed to be so slow?

My guess is entropy problems as well.  If available, configuring
/dev/urandom passthrough from the host is a generally helpful thing to
do.

My (Fedora, Centos/RHEL 7+) krb5 builds use getrandom() for entropy, so
they shouldn't be slow; I believe Debian also has started doing so
recently as well.  I don't know what other distros/OSs do for this.

Thanks,
--Robbie

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (220+ messages)  latest in thread

Message-ID: <jlgv9ztr8uf.fsf@redhat.com>
Permalink:  ../jlgv9ztr8uf.fsf@redhat.com/
Also on:    postgresql.org/message-id/jlgv9ztr8uf.fsf@redhat.com

 · 

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: rharwood@redhat.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com, david@pgmasters.net, mail@joeconway.com, magnus@hagander.net, michael@paquier.xyz, nico@cryptonector.com
  Subject: Re: [PATCH v20] GSSAPI encryption support
  In-Reply-To: <jlgv9ztr8uf.fsf@redhat.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