GDRCopy build/installation fails on kernel v6.17 and above

Open
#335 17 comments 2 reactions 1 assignee View on GitHub

@pakmarkthub is already working on this.

Since Jul 1, 2026.

Assessment

This issue has not been assessed yet.

Description

ProblemType: Package
DKMSBuildLog:
 DKMS (dkms-3.3.0) make.log for gdrdrv/2.5 for kernel 6.17.0-1004-nvidia-64k (arm64)
 Sun Dec  7 03:00:51 UTC 2025
 
 Building module(s)
 # command: cd /var/lib/dkms/gdrdrv/2.5/build && make CONF_SCRIPT_DIR=scripts KVER=6.17.0-1004-nvidia-64k
 Picking NVIDIA driver sources from NVIDIA_SRC_DIR=/usr/src/nvidia-590.44.01/nvidia. If that does not meet your expectation, you might have a stale driver still around and that might cause problems.
 Setting NVIDIA_IS_OPENSOURCE=y
 Setting HAVE_VM_FLAGS_SET=n
 Setting HAVE_PROC_OPS=y
 make[1]: Entering directory '/usr/src/linux-headers-6.17.0-1004-nvidia-64k'
 make[2]: Entering directory '/var/lib/dkms/gdrdrv/2.5/build'
 warning: the compiler differs from the one used to build the kernel
   The kernel was built by: aarch64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
   You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
   CC [M]  nv-p2p-dummy.o
   CC [M]  gdrdrv.o
 gdrdrv.c:157:20: error: redefinition of ‘vm_flags_set’
   157 | static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
       |                    ^~~~~~~~~~~~
 In file included from gdrdrv.c:34:
 /usr/src/linux-headers-6.17.0-1004-nvidia-64k/include/linux/mm.h:743:20: note: previous definition of ‘vm_flags_set’ with type ‘void(struct vm_area_struct *, vm_flags_t)’ {aka ‘void(struct vm_area_struct *, long unsigned int)’}
   743 | static inline void vm_flags_set(struct vm_area_struct *vma,
       |                    ^~~~~~~~~~~~
 gdrdrv.c: In function ‘vm_flags_set’:
 gdrdrv.c:159:19: error: assignment of read-only member ‘vm_flags’
   159 |     vma->vm_flags |= flags;
       |                   ^~
 make[4]: *** [/usr/src/linux-headers-6.17.0-1004-nvidia-64k/scripts/Makefile.build:287: gdrdrv.o] Error 1

Root Cause:
Starting v6.15, vm_flags_set is marked GPL only symbol - https://github.com/torvalds/linux/commit/45ad9f5290dc4bb2249e951d4b3756d3ebda2d66

The build failed because dummy test module used a GPL‑only kernel symbol (__vma_start_write, reached via vm_flags_set) while declaring a non‑GPL license (MODULE_LICENSE("MIT")) in test_gdrdrv_HAVE_VM_FLAGS_SET.sh script. The kernel’s modpost step checks module license and rejected any module that uses GPL‑only symbols but is not marked with a GPL‑compatible license, which caused the error GPL-incompatible module test-dummy.ko uses GPL-only symbol '__vma_start_write' and a non‑zero return code.

Solution: Mark test-dummy.ko with Dual MIT/GPL license

Dominant language
C
Stars
1.4k
Forks
198
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/gdrcopy

All issues in NVIDIA/gdrcopy

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.