Skip to content

Linux 6.19 compat: in-tree build: fix duplicate GCM assembly functions - #18224

Merged
behlendorf merged 1 commit into
openzfs:masterfrom
AttilaFueloep:zfs-aes-gcm-rename-funcs
Feb 17, 2026
Merged

behlendorf merged 1 commit into
openzfs:masterfrom
AttilaFueloep:zfs-aes-gcm-rename-funcs

Conversation

@AttilaFueloep

Copy link
Copy Markdown
Contributor

Motivation and Context

Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's basically a translation from the BoringSSL perlasm syntax to macro assembly. We're using the same source but the perlasm generated flat assembly which shares some global function names with the former. When building in-tree this results in the linker failing due to the duplicate symbols.

Closes #18204

Description

To avoid the error we prepend icp_ via a macro to our function names.

How Has This Been Tested?

Compiled and manually tested with nm that the rename worked as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's
basically a translation from the BoringSSL perlasm syntax to macro
assembly. We're using the same source but the perlasm generated flat
assembly which shares some global function names with the former.
When  building in-tree this results in the linker failing due to the
duplicate symbols.

To avoid the error we prepend `icp_` via a macro to our function
names.

Signed-off-by: Attila Fülöp 
Closes openzfs#18204
@alex-moch

Copy link
Copy Markdown
Contributor

I just applied the patch. Works for me.

Thanks for the PR!

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Feb 17, 2026
@behlendorf
behlendorf merged commit bee53d8 into openzfs:master Feb 17, 2026
36 of 41 checks passed
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2026
Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's
basically a translation from the BoringSSL perlasm syntax to macro
assembly. We're using the same source but the perlasm generated flat
assembly which shares some global function names with the former.
When  building in-tree this results in the linker failing due to the
duplicate symbols.

To avoid the error we prepend `icp_` via a macro to our function
names.

Reviewed-by: Brian Behlendorf 
Reviewed-by: Alexander Moch 
Signed-off-by: Attila Fülöp 
Closes openzfs#18204
Closes openzfs#18224
@AttilaFueloep
AttilaFueloep deleted the zfs-aes-gcm-rename-funcs branch February 26, 2026 15:07
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Jul 30, 2026
Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's
basically a translation from the BoringSSL perlasm syntax to macro
assembly. We're using the same source but the perlasm generated flat
assembly which shares some global function names with the former.
When  building in-tree this results in the linker failing due to the
duplicate symbols.

To avoid the error we prepend `icp_` via a macro to our function
names.

Reviewed-by: Brian Behlendorf 
Reviewed-by: Alexander Moch 
Signed-off-by: Attila Fülöp 
Closes openzfs#18204
Closes openzfs#18224
pull Bot pushed a commit to A-Archives-and-Forks/openzfs that referenced this pull request Sep 26, 2026
Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's
basically a translation from the BoringSSL perlasm syntax to macro
assembly. We're using the same source but the perlasm generated flat
assembly which shares some global function names with the former.
When  building in-tree this results in the linker failing due to the
duplicate symbols.

To avoid the error we prepend `icp_` via a macro to our function
names.

Reviewed-by: Brian Behlendorf 
Reviewed-by: Alexander Moch 
Signed-off-by: Attila Fülöp 
Closes openzfs#18204
Closes openzfs#18224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate symbol in aesni-gcm-avx2-vaes.S on Linux 6.19 with --enable-linux-builtin

3 participants