Closed Bug 1580126 Opened 5 years ago Closed 5 years ago

Fix build failure on aarch64_be while building freebl/gcm

Categories

(NSS :: Build, defect, P1)

3.46
ARM64
Unspecified
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giulio.benetti, Assigned: giulio.benetti)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Steps to reproduce:

Here is Buildroot autobuilder build failure:
http://autobuild.buildroot.net/results/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00

Actual results:

Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm-aarch64.o: In function gcm_HashMult_hw': /home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm-aarch64.c:30: multiple definition ofgcm_HashMult_hw'
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm.o:/home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm.c:50: first defined here
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm-aarch64.o: In function gcm_HashMult_hw': /home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm-aarch64.c:30: multiple definition ofgcm_HashWrite_hw'
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm.o:/home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm.c:400: first defined here
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm-aarch64.o: In function gcm_HashMult_hw': /home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm-aarch64.c:30: multiple definition ofgcm_HashInit_hw'
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm.o:/home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm.c:400: first defined here
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm-aarch64.o: In function gcm_HashMult_hw': /home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm-aarch64.c:30: multiple definition ofgcm_HashZeroX_hw'
Linux2.6_aarch64_aarch64_be-linux-gnu-gcc_glibc_PTH_64_DBG.OBJ/Linux_SINGLE_SHLIB/gcm.o:/home/giuliobenetti/br_reproduce/bfd29593bb6c53d3e9e2d02d2ed6bea360d99c00/output/build/libnss-3.46/nss/lib/freebl/gcm.c:400: first defined here
collect2: error: ld returned 1 exit status

This Arm speedup should work with big endian too.

Comment on attachment 9091683 [details] [diff] [review]
0001-Bug-1580126-Fix-build-failure-on-aarch64_be-while-bu.patch

Review of attachment 9091683 [details] [diff] [review]:
-----------------------------------------------------------------

Kevin, I remember there was a good reason for that check, can you take a look?
Attachment #9091683 - Flags: review?(kjacobs.bugzilla)
Assignee: nobody → giulio.benetti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Hardware: Unspecified → ARM64

Thanks for the report.

It looks like this is caused by the differing ifdef conditions between gcm.c (for USE_HW_GCM) and gcm-aarch64.c. The original patch didn't enable this for big endian as the submitter had no way to test it (nor do we currently).

Giulio, would you like to update the patch to check IS_LITTLE_ENDIAN and __aarch64__ in gcm-aarch64.c?

Flags: needinfo?(giulio.benetti)

(In reply to Kevin Jacobs [:kjacobs] from comment #3)

Thanks for the report.

It looks like this is caused by the differing ifdef conditions between gcm.c (for USE_HW_GCM) and gcm-aarch64.c. The original patch didn't enable this for big endian as the submitter had no way to test it (nor do we currently).

Giulio, would you like to update the patch to check IS_LITTLE_ENDIAN and __aarch64__ in gcm-aarch64.c?

Sure I'm going to do that today.

Flags: needinfo?(giulio.benetti)
Attachment #9091683 - Attachment is obsolete: true
Attachment #9091683 - Flags: review?(kjacobs.bugzilla)

Oops in commit log there are 2 SoBs.
Can you reword it when applying?
Thanks

Attachment #9092061 - Flags: review+

My apologies for the slow response; the flag cleared before I saw this pop up in my queue.

This looks good and yes, we can take care of the commit message fixup. I'll assume you want to keep "Giulio Benetti <giulio.benetti@micronovasrl.com>" per your commit history, let us know if otherwise.

Thanks.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.47

(In reply to Kevin Jacobs [:kjacobs] from comment #7)

My apologies for the slow response; the flag cleared before I saw this pop up in my queue.
No problem
This looks good and yes, we can take care of the commit message fixup. I'll assume you want to keep "Giulio Benetti <giulio.benetti@micronovasrl.com>" per your commit history, let us know if otherwise.
Yes, that's ok. It will be for next time :)
Thanks.
Thank you

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: