From e85ab0b20891caf16dc2fbba36a0537cf1d676b9 Mon Sep 17 00:00:00 2001 From: rmartinc Date: Wed, 28 Feb 2024 12:45:19 +0100 Subject: [PATCH] Change fake_fips for linux 6.4 changes Closes #27345 Signed-off-by: rmartinc (cherry picked from commit a3f91ef95b09f914d95404bd36fa25296f5d7a7c) --- .github/fake_fips/fake_fips.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/fake_fips/fake_fips.c b/.github/fake_fips/fake_fips.c index 207a4a5c7db..5c0b38c3942 100644 --- a/.github/fake_fips/fake_fips.c +++ b/.github/fake_fips/fake_fips.c @@ -22,6 +22,7 @@ #include #include +#include int fips_enabled = 1; @@ -39,7 +40,9 @@ static struct ctl_table crypto_dir_table[] = { { .procname = "crypto", .mode = 0555, +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)) .child = crypto_sysctl_table +#endif }, {} }; @@ -48,7 +51,11 @@ static struct ctl_table_header *crypto_sysctls; static void crypto_proc_fips_init(void) { +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)) crypto_sysctls = register_sysctl_table(crypto_dir_table); +#else + crypto_sysctls = register_sysctl(crypto_dir_table->procname, crypto_sysctl_table); +#endif } static void crypto_proc_fips_exit(void)