Skip to content

Conversation

@qrsikno2
Copy link
Contributor

@qrsikno2 qrsikno2 commented Aug 4, 2025

This pull request updates the luacrypto_comp.c file to ensure compatibility with different Linux kernel versions. The changes introduce conditional compilation to handle the deprecation of the crypto_comp API in Linux kernel version 6.15 and later.

Compatibility updates for Linux kernel versions:

  • Added a version check using LINUX_VERSION_CODE to conditionally include the crypto_comp module only for kernels below version 6.15.
  • Introduced a preprocessor warning to notify developers that the crypto_comp API is removed in Linux kernel versions 6.15 and above.

Code maintenance:

  • Included <linux/version.h> to access the LINUX_VERSION_CODE macro for kernel version checks.

@qrsikno2 qrsikno2 requested review from jperon and lneto August 4, 2025 12:53
@jperon
Copy link
Collaborator

jperon commented Aug 4, 2025

That would be OK, but with the work on #311, it’s not very useful; moreover, it would induce merge conflicts when acompress gets done.

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
#warning "crypto_comp API removed in Linux ≥6.15, skip COMP module"
#else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

#include "luacrypto.h"

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
#warning "crypto_comp API removed in Linux ≥6.15, skip COMP module"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#warning "crypto_comp API removed in Linux 6.15, skip COMP module"
#warning "crypto_comp API was removed in Linux 6.15, skip COMP module"

@qrsikno2 qrsikno2 force-pushed the ifdef_comp_kernelverion branch from 41eece5 to 96fa4f6 Compare August 4, 2025 13:16
@lneto
Copy link
Contributor

lneto commented Aug 4, 2025

That would be OK, but with the work on #311, it’s not very useful; moreover, it would induce merge conflicts when acompress gets done.

it's just a temporary fix.. you can remove it completely on acompress branch.. if it's alright to you, I would merge it..

@lneto lneto merged commit 1a3b0ee into luainkernel:master Aug 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants