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

[2.1] compat: add check for kernel_neon_* availability #15761

Conversation

ziggythehamster
Copy link

@ziggythehamster ziggythehamster commented Jan 12, 2024

This patch backports the change from #15711 (to ZFS 2.2.x) because some OS vendors have back-ported this change from Linux 6.2+ to their older kernels.

The original patch addressed these issues:

  1. Linux 6.2+ on arm64 has exported them with EXPORT_SYMBOL_GPL, so license compatibility must be checked before use.
  2. On both arm and arm64, the definitions of these symbols are guarded by CONFIG_KERNEL_MODE_NEON, but their declarations are still present. Checking in configuration phase only leads to MODPOST errors (undefined references).

How Has This Been Tested?

Our CI system is building RPMs for this large matrix and this patch is applied on all ZFS 2.1 builds irrespective of the other things in the matrix:

  • architecture: aarch64, x86_64
  • ZFS version: 2.1, 2.2
  • ZFS variant/flavor: dkms, kabi
  • Enterprise Linux version: 8, 9 (specifically we use Rocky Linux)

The problem resolved by this PR only came up on EL9 aarch64, because EL9 backported the patch from Linux 6.2 in the latest version. I have successfully built and installed all of the packages this matrix creates, but due to CI using Docker, I have not yet had the opportunity to load the actual kernel modules. I assume that the project's build bot does do this, but if not, I plan on rolling this out in the next week or so and can check it then.

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)
  • 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:

This patch backports the change from openzfs#15711 (to ZFS 2.2.x) because
some OS vendors have back-ported this change from Linux 6.2+ to their
older kernels.

The original patch addressed these issues:

1. Linux 6.2+ on arm64 has exported them with `EXPORT_SYMBOL_GPL`, so
   license compatibility must be checked before use.
2. On both arm and arm64, the definitions of these symbols are guarded
   by `CONFIG_KERNEL_MODE_NEON`, but their declarations are still
   present. Checking in configuration phase only leads to MODPOST
   errors (undefined references).

Signed-off-by: Keith Gable <keith@ziggythehamster.sh>
Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Jan 12, 2024
@behlendorf behlendorf merged commit f8f3cac into openzfs:zfs-2.1.15-staging Jan 12, 2024
7 of 12 checks passed
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.

3 participants