qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] quorum: Only compile when supported
Date: Tue, 5 Jul 2016 10:26:56 +0100	[thread overview]
Message-ID: <20160705092656.GE6553@redhat.com> (raw)
In-Reply-To: <w51d1msjvdm.fsf@maestria.local.igalia.com>

On Tue, Jul 05, 2016 at 11:18:29AM +0200, Alberto Garcia wrote:
> On Tue 05 Jul 2016 10:45:21 AM CEST, Daniel P. Berrange wrote:
> 
> > The point of using qcrypto_hash_supports() is that it isolates the
> > block code Makefile rules from the details of the current specific
> > impl of the hash APIs in QEMU. As a prime example of why this is
> > important, try rebasing to GIT master, and you'll find we no longer
> > use gnutls for the hash APIs. We choose between libgcrypt, nettle or a
> > empty stub for hash impls now. I think it is a backwards step to add
> > back these makefile conditionals
> 
> Now that you mention this I wonder why we are not using glib for the
> hashing functions. GChecksum is available since glib 2.16 (QEMU requires
> 2.22) and it supports MD5, SHA1, SHA256 and SHA512. I see that in git
> master there's now a few algorithms more, but for the Quorum case those
> ones are enough.

The GChecksum API is inadequate for QEMU's needs, due to its limited
range of algorithms. We absolutely do not want different areas of
the code using different APIs either. The goal of the crypto APIs is
to provide a standard internal API for all cryptographic related
operations for use across the whole codebase. This has clarified much
of our code by removing countless #ifdef conditionals from the code
and similar from the build system. It also facilitates people auditing
QEMU use & implementation of crypto as there is only one place to look
at to review. It also ensures that QEMU is only using certified secure
crypto libraries, not some custom re-implementation of the crypto
algorithms that have never been through a security review. Finally is
ensures that QEMU correctly responds to runtime configurable changes,
such as FIPS mode which restricts use of certain crypto algorithms
at runtime, even if they're technically available at compile time.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2016-07-05  9:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  1:47 [Qemu-devel] [PATCH] quorum: Only compile when supported Fam Zheng
2016-06-28  8:17 ` Alberto Garcia
2016-07-02 12:36 ` Max Reitz
2016-07-04 11:43   ` Alberto Garcia
2016-07-05  7:03   ` Fam Zheng
2016-07-05  7:58 ` Sascha Silbe
2016-07-05  8:11   ` Fam Zheng
2016-07-05  8:20   ` Alberto Garcia
2016-07-05  9:15     ` Sascha Silbe
2016-07-05  8:45 ` Daniel P. Berrange
2016-07-05  8:57   ` Fam Zheng
2016-07-05  9:35     ` Daniel P. Berrange
2016-07-06  0:56       ` Fam Zheng
2016-07-05  9:18   ` Alberto Garcia
2016-07-05  9:26     ` Daniel P. Berrange [this message]
2016-07-05 10:05       ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160705092656.GE6553@redhat.com \
    --to=berrange@redhat.com \
    --cc=berto@igalia.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).