NetBSD Problem Report #53386
From www@NetBSD.org Wed Jun 20 16:28:54 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 97B207A16A
for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 Jun 2018 16:28:54 +0000 (UTC)
Message-Id: <20180620162853.902247A280@mollari.NetBSD.org>
Date: Wed, 20 Jun 2018 16:28:53 +0000 (UTC)
From: mayuresh@acm.org
Reply-To: mayuresh@acm.org
To: gnats-bugs@NetBSD.org
Subject: libcrypto on arm has getauxval as a weak symbol, unclear whether needed
X-Send-Pr-Version: www-1.0
>Number: 53386
>Category: port-arm
>Synopsis: libcrypto on arm has getauxval as a weak symbol, unclear whether needed
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-arm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 20 16:30:00 +0000 2018
>Closed-Date: Tue Nov 20 07:51:12 +0000 2018
>Last-Modified: Tue Nov 20 07:51:12 +0000 2018
>Originator: Mayuresh
>Release: 8.0_RC1
>Organization:
>Environment:
NetBSD pi 8.0_RC1 NetBSD 8.0_RC1 (RPI2) #0: Sun Jun 17 16:30:05 IST 2018 root@pi:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm
>Description:
It is unclear whether the following difference between evbarm is intentional, as it has led to some other problems described in the mail thread cited below.
# uname -m && nm /usr/lib/libcrypto.so | grep getauxval
evbarm
w getauxval
# uname -m && nm /usr/lib/libcrypto.so | grep getauxval
amd64
Further issue analysis by Martin Husemann
http://mail-index.netbsd.org/netbsd-users/2018/06/20/msg020981.html
>How-To-Repeat:
The issue came to light from pkg side, for which a separate PR is being filed. This PR is about presence / absence of getauxval in libcrypto.
>Fix:
Not known.
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-arm/53386: libcrypto on arm has getauxval as a weak symbol,
unclear whether needed
Date: Wed, 20 Jun 2018 19:43:43 +0200
This is totally intentional (and obvious from the source).
Whether it is good design is another issue.
You should discuss this with openssl upstream (but they'll point you
to the obvious other bug involved first).
The real fix for openssl on NetBSD is to use sysctl to probe for
hardware features instead, but that is not trivial (or kinda tedious)
since they do it in a constructor (instead of lazy when first needed).
Martin
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, mayuresh@acm.org
Cc:
Subject: Re: port-arm/53386: libcrypto on arm has getauxval as a weak symbol, unclear whether needed
Date: Wed, 20 Jun 2018 15:05:18 -0400
On Jun 20, 5:45pm, martin@duskware.de (Martin Husemann) wrote:
-- Subject: Re: port-arm/53386: libcrypto on arm has getauxval as a weak symb
| This is totally intentional (and obvious from the source).
| Whether it is good design is another issue.
The bug is really with the other library exposing a commonly named function
that does not implement what the function is supposed to do.
christos
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53386 CVS commit: src/crypto/external/bsd/openssl/dist/crypto
Date: Tue, 20 Nov 2018 07:30:18 +0000
Module Name: src
Committed By: maya
Date: Tue Nov 20 07:30:18 UTC 2018
Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: armcap.c ppccap.c
Log Message:
Don't expose a getauxval symbol.
The code already knows how to handle it, but it assumes anyone who uses
GCC or clang might resolve the getauxval function to something eventually.
The only time we will expose getauxval is if a package tries to substitute
getauxval too, and then code will start having mysterious failures.
getauxval is purely a linux function (as far as I can see), so limit it to
that.
PR pkg/53387, PR port-arm/53386
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/dist/crypto/armcap.c
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 20 Nov 2018 07:51:12 +0000
State-Changed-Why:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.