Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2020 18:23:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        gecko@FreeBSD.org
Subject:   maintainer-approval requested: [Bug 246419] security/nss: fix build on powerpc64 elfv1 : [Attachment 214420] v3
Message-ID:  <bug-246419-21738-2gFRGmZ97W@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-246419-21738@https.bugs.freebsd.org/bugzilla/>
References:  <bug-246419-21738@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Piotr Kubaj <pkubaj@FreeBSD.org> has asked freebsd-gecko mailing list
<gecko@FreeBSD.org> for maintainer-approval:
Bug 246419: security/nss: fix build on powerpc64 elfv1
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246419

Attachment 214420: v3
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214420&action=3Dedit



--- Comment #3 from Piotr Kubaj <pkubaj@FreeBSD.org> ---
Created attachment 214420
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D214420&action=
=3Dedit
v3

More correct solution.

The previous patch worked, but sha512-p8 wasn't included in the final binary
because USE_PPC_CRYPTO is disabled. sha512-p8 was just built, but not used
earlier. This is why all tests passed.

The problem with it is that the assembly is tailored to little-endian and w=
on't
work on big-endian. However, there is a proper script to generate sha512-p8=
 for
big-endian, both elfv1 and elfv2. There is also a variant for 32-bit powerp=
c.
Ideally, this script should run always, but upstream seems to have forgotten
that and just put the generated sha512-p8 to the source. This patch takes c=
are
of running this script.

Also, since USE_PPC_CRYPTO works on big-endian, put an option to enable tha=
t.
It will use VSX, which is available on POWER8 and newer. I made it availabl=
e on
32 bits as well, just in case someone on VSX-capable machine wants to run
32-bit chroot or jail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246419-21738-2gFRGmZ97W>