Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs on sparc needs const static int sha1_consts[] = { ... } inside SHA1Transform() to compile #6738

Closed
KireinaHoro opened this issue Oct 8, 2017 · 2 comments · Fixed by #6750
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture

Comments

@KireinaHoro
Copy link
Contributor

KireinaHoro commented Oct 8, 2017

System information

Type Version/Name
Distribution Name Gentoo Linux
Distribution Version Live
Linux Kernel 4.9.49
Architecture UltraSPARC T2
ZFS Version [all]
SPL Version [all]

Describe the problem you're observing

https://github.com/bahamas10/openzfs/blob/d4732e670edab07052ad1ccbcb4497c9bf6df199/usr/src/common/crypto/sha1/sha1.c#L502-L538

We need that as well, as SHA1_CONST macro has defined the behavior is to use this array on sparc, yet which was not implemented in the sources, which would result in the linker not finding the corresponding symbol sha1_consts.

https://github.com/zfsonlinux/zfs/blob/87f9371aefca857e7091dfdee3ec2d36b0de54c4/module/icp/include/sha1/sha1_consts.h#L46-L49

Describe how to reproduce the problem

[inapplicable]

Include any warning/errors/backtraces from the system logs

[inapplicable]

@loli10K loli10K added the Type: Architecture Indicates an issue is specific to a single processor architecture label Oct 8, 2017
@KireinaHoro
Copy link
Contributor Author

Adding this fixed the undefined reference issue mentioned in #6733 . The port to SPARC works now and passed ztest successfully.

@behlendorf
Copy link
Contributor

@KireinaHoro thanks for digging in to this. It would be great if you could open a PR with the needed fixes so we can get it reviewed and merged.

behlendorf added a commit that referenced this issue Oct 12, 2017
The current code base almost compiles on SPARC, but a few fixes are
required for the code to compile (and work efficiently). Code in this 
PR comes from OpenZFS project which was initially dropped when porting
the crypto framework.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Closes #6733 
Closes #6738 
Closes #6750
aerusso pushed a commit to aerusso/zfs that referenced this issue Oct 12, 2017
The current code base almost compiles on SPARC, but a few fixes are
required for the code to compile (and work efficiently). Code in this 
PR comes from OpenZFS project which was initially dropped when porting
the crypto framework.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Closes openzfs#6733 
Closes openzfs#6738 
Closes openzfs#6750
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Oct 15, 2017
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
tonyhutter pushed a commit that referenced this issue Oct 16, 2017
The current code base almost compiles on SPARC, but a few fixes are
required for the code to compile (and work efficiently). Code in this
PR comes from OpenZFS project which was initially dropped when porting
the crypto framework.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Closes #6733
Closes #6738
Closes #6750
wli5 pushed a commit to wli5/zfs that referenced this issue Oct 20, 2017
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Nov 4, 2017
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Nov 6, 2017
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Jan 29, 2018
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this issue Feb 13, 2018
Passing arguments explicitly into SHA1Transform() increases the number of
registers abailable to the compiler, hence leaving more local and out registers
available. The missing symbol of sha1_consts[], which prevents compiling on
SPARC, is added back, which speeds up the process of utilizing the relative
constants.
This should fix openzfs#6738.

Signed-off-by: Pengcheng Xu <i@jsteward.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants