Skip to content

Conversation

@m-pellizzer
Copy link

The driver FTBFS against the latest 6.14 Linux kernel, in particular due to the following upstream commits:

  • 5f60d5f6bbc12e move asm/unaligned.h to linux/unaligned.h
  • cdd30ebb1b9f36 module: Convert symbol namespace to string literal

Adjusted the code to solve compile time errors on Linux 6.14.

In Linux 6.12 the header asm/unaligned.h has been moved to
linux/unaligned.h.
See commit 5f60d5f6bbc12e move asm/unaligned.h to linux/unaligned.h

This causes the following compile time error:

magma_generic.c:14:10: fatal error: asm/unaligned.h: No such file or directory
   14 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
gosthash94_generic.c:34:10: fatal error: asm/unaligned.h: No such file or directory
   34 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
kuznyechik_generic.c:15:10: fatal error: asm/unaligned.h: No such file or directory
   15 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
gost28147_basic.c:42:10: fatal error: asm/unaligned.h: No such file or directory
   42 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~

Adjust the code for kernels >= 6.12.

Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>
In Linux 6.13 symbol namespaces has been converted to string literals.
See commit cdd30ebb1b9f36 module: Convert symbol namespace to string literal.

This causes the following compile time error:

In file included from /usr/src/linux-headers-6.14.0-5-generic/include/linux/module.h:22,
                 from testmgr.c:27:
testmgr.c:35:18: error: expected ‘,’ or ‘;’ before ‘CRYPTO_INTERNAL’
   35 | MODULE_IMPORT_NS(CRYPTO_INTERNAL);
      |                  ^~~~~~~~~~~~~~~
/usr/src/linux-headers-6.14.0-5-generic/include/linux/moduleparam.h:26:61: note: in definition of macro ‘__MODULE_INFO’
   26 |                 = __MODULE_INFO_PREFIX __stringify(tag) "=" info
      |                                                             ^~~~
/usr/src/linux-headers-6.14.0-5-generic/include/linux/module.h:299:33: note: in expansion of macro ‘MODULE_INFO’
  299 | #define MODULE_IMPORT_NS(ns)    MODULE_INFO(import_ns, ns)
      |                                 ^~~~~~~~~~~
testmgr.c:35:1: note: in expansion of macro ‘MODULE_IMPORT_NS’
   35 | MODULE_IMPORT_NS(CRYPTO_INTERNAL);
      | ^~~~~~~~~~~~~~~~

Adjust the code for kernels >= 6.13.

Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant