All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH] crypto: aes: always rename internal symbols
Date: Tue, 7 Jun 2016 09:21:10 +0100	[thread overview]
Message-ID: <20160607082110.GA20196@redhat.com> (raw)
In-Reply-To: <1465250735-30064-1-git-send-email-vapier@gentoo.org>

On Mon, Jun 06, 2016 at 06:05:35PM -0400, Mike Frysinger wrote:
> From: Mike Frysinger <vapier@chromium.org>
> 
> OpenSSL's libcrypto always defines AES symbols with the same names as
> qemu's local aes code.  This is problematic when enabling at least curl
> as that frequently also uses libcrypto.  It might not be noticed when
> running, but if you try to statically link, everything falls down.
> 
> An example snippet:
>   LINK  qemu-nbd
> .../libcrypto.a(aes-x86_64.o): In function 'AES_encrypt':
> (.text+0x460): multiple definition of 'AES_encrypt'
> crypto/aes.o:aes.c:(.text+0x670): first defined here
> .../libcrypto.a(aes-x86_64.o): In function 'AES_decrypt':
> (.text+0x9f0): multiple definition of 'AES_decrypt'
> crypto/aes.o:aes.c:(.text+0xb30): first defined here
> .../libcrypto.a(aes-x86_64.o): In function 'AES_cbc_encrypt':
> (.text+0xf90): multiple definition of 'AES_cbc_encrypt'
> crypto/aes.o:aes.c:(.text+0xff0): first defined here
> collect2: error: ld returned 1 exit status
> .../qemu-2.6.0/rules.mak:105: recipe for target 'qemu-nbd' failed
> make: *** [qemu-nbd] Error 1
> 
> The aes.h header has redefines already for FreeBSD, but go ahead and
> enable that for everyone since there's no real good reason to not use
> a namespace all the time.
> 
> Signed-off-by: Mike Frysinger <vapier@chromium.org>
> ---
>  include/crypto/aes.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Thanks, applied to the crypto patch queue.

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-06-07  8:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 22:05 [Qemu-devel] [PATCH] crypto: aes: always rename internal symbols Mike Frysinger
2016-06-07  8:21 ` Daniel P. Berrange [this message]

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=20160607082110.GA20196@redhat.com \
    --to=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vapier@gentoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.