[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 10/11] crypto: push error reporting into TLS session I/O APIs
From: |
Daniel P . Berrangé |
Subject: |
Re: [PULL 10/11] crypto: push error reporting into TLS session I/O APIs |
Date: |
Thu, 29 Aug 2024 12:03:45 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Wed, Aug 28, 2024 at 10:32:15AM +0200, Thomas Huth wrote:
> On 27/08/2024 09.05, Markus Armbruster wrote:
> > Daniel P. Berrangé <berrange@redhat.com> writes:
> >
> > > On Mon, Aug 12, 2024 at 05:38:41PM +0200, Thomas Huth wrote:
> > > > On 24/07/2024 11.47, Daniel P. Berrangé wrote:
> > > > > The current TLS session I/O APIs just return a synthetic errno
> > > > > value on error, which has been translated from a gnutls error
> > > > > value. This looses a large amount of valuable information that
> > > > > distinguishes different scenarios.
> > > > >
> > > > > Pushing population of the "Error *errp" object into the TLS
> > > > > session I/O APIs gives more detailed error information.
> > > > >
> > > > > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > > > ---
> > > >
> > > > Hi Daniel!
> > > >
> > > > iotest 233 is failing for me with -raw now, and bisection
> > > > points to this commit. Output is:
> > > >
> > > > --- .../qemu/tests/qemu-iotests/233.out
> > > > +++ /tmp/qemu/tests/qemu-iotests/scratch/raw-file-233/233.out.bad
> > > > @@ -69,8 +69,8 @@
> > > > 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > > >
> > > > == check TLS with authorization ==
> > > > -qemu-img: Could not open
> > > > 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Failed to read
> > > > option reply: Cannot read from TLS channel: Software caused connection
> > > > abort
> > > > -qemu-img: Could not open
> > > > 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Failed to read
> > > > option reply: Cannot read from TLS channel: Software caused connection
> > > > abort
> > > > +qemu-img: Could not open
> > > > 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Failed to read
> > > > option reply: Cannot read from TLS channel: The TLS connection was
> > > > non-properly terminated.
> > > > +qemu-img: Could not open
> > > > 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Failed to read
> > > > option reply: Cannot read from TLS channel: The TLS connection was
> > > > non-properly terminated.
> > >
> > > This is an expected change. Previously squashed the real GNUTLS error
> > > into ECONNABORTED:
> > >
> > > - case GNUTLS_E_PREMATURE_TERMINATION:
> > > - errno = ECONNABORTED;
> > > - break;
> > >
> > >
> > > now we report the original gnutls root cause.
> > >
> > > IOW, we need to update the expected output files.
> >
> > Has this been done?
>
> No, I think the problem still persists.
I've just cc'd you both on a patch that fixes this.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|