Hello,
Since kernel 6.10 is officially released, we are still missing a working patch or a newer version of this driver.
In my case, nvidia-470.256.02 will not build the kernel modules; using the patch adapted from the open gpu kernel modules repository will result in the GPL-only symbol errors:
MODPOST /var/lib/dkms/nvidia/470.256.02/build/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'follow_pte'
make[3]: *** [scripts/Makefile.modpost:145: /var/lib/dkms/nvidia/470.256.02/build/Module.symvers] Error 1
Is there any workaround that does not involve modifying the kernel sources ?
Could it be that CVE-2024-38610 has impacted the release of a patch ? (I see follow_pte mentioned multiple times)
Thank you in advance for any feedback !
Can you, please, provide more details about why the older 470.239.06 would work instead of the latest 470.256.02 ?
Same behavior with vanilla kernel 6.10:
Building module:
Cleaning build area…
‘make’ -j4 NV_EXCLUDE_BUILD_MODULES=‘’ KERNEL_UNAME=6.10.0 IGNORE_CC_MISMATCH=‘’ modules…(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.10.0 (x86_64)
Consult /var/lib/dkms/nvidia/470.256.02/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.10.0 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
this does not happen with vanilla 6.9.9.
Appears that 555.58.02, and 550.100 won’t build right with Linux 6.10.
Thank you for the info that Linux 6.9.9 works.
You can try this patch:
diff -ruNb a/kernel/conftest.sh b/kernel/conftest.sh
--- a/conftest.sh 2024-07-19 04:36:26.183701185 -0500
+++ b/conftest.sh 2024-07-19 04:36:26.230366381 -0500
@@ -4464,20 +4464,22 @@
compile_check_conftest "$CODE" "NV_DRM_GEM_OBJECT_VMAP_HAS_MAP_ARG" "" "types"
;;
- unsafe_follow_pfn)
+ follow_pfn)
#
- # Determine if unsafe_follow_pfn() is present.
+ # Determine if follow_pfn() is present.
#
- # unsafe_follow_pfn() was added by commit 69bacee7f9ad
- # ("mm: Add unsafe_follow_pfn") in v5.13-rc1.
+ # follow_pfn() was added by commit 3b6748e2dd69
+ # ("mm: introduce follow_pfn()") in v2.6.31-rc1, and removed
+ # by commit 233eb0bf3b94 ("mm: remove follow_pfn")
+ # from linux-next 233eb0bf3b94.
#
CODE="
#include <linux/mm.h>
- void conftest_unsafe_follow_pfn(void) {
- unsafe_follow_pfn();
+ void conftest_follow_pfn(void) {
+ follow_pfn();
}"
- compile_check_conftest "$CODE" "NV_UNSAFE_FOLLOW_PFN_PRESENT" "" "functions"
+ compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
;;
drm_plane_atomic_check_has_atomic_state_arg)
diff -ruNb a/kernel/nvidia/nvidia.Kbuild b/kernel/nvidia/nvidia.Kbuild
--- a/nvidia/nvidia.Kbuild 2022-10-12 04:29:57.000000000 -0500
+++ b/nvidia/nvidia.Kbuild 2024-07-19 05:17:39.148448922 -0500
@@ -164,7 +164,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += cc
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iterate_fd
NV_CONFTEST_FUNCTION_COMPILE_TESTS += seq_read_iter
NV_CONFTEST_FUNCTION_COMPILE_TESTS += sg_page_iter_page
-NV_CONFTEST_FUNCTION_COMPILE_TESTS += unsafe_follow_pfn
+NV_CONFTEST_FUNCTION_COMPILE_TESTS += follow_pfn
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_gem_object_get
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_gem_object_put_unlocked
NV_CONFTEST_FUNCTION_COMPILE_TESTS += set_close_on_exec
diff -ruNb a/kernel/nvidia/os-mlock.c b/kernel/nvidia/os-mlock.c
--- a/nvidia/os-mlock.c 2022-10-12 04:30:26.000000000 -0500
+++ b/nvidia/os-mlock.c 2024-07-19 04:36:26.230366381 -0500
@@ -18,10 +18,10 @@
unsigned long address,
unsigned long *pfn)
{
-#if defined(NV_UNSAFE_FOLLOW_PFN_PRESENT)
- return unsafe_follow_pfn(vma, address, pfn);
-#else
+#if defined(NV_FOLLOW_PFN_PRESENT)
return follow_pfn(vma, address, pfn);
+#else
+ return -1;
#endif
}
2 Likes
@philmmanjaro Thank you for the patch; it allows to build the kernel modules with kernel 6.10.
I can also confirm that it builds and works with:
6.6.41 (vanilla and MANJARO specific)
6.9.10 (vanilla and MANJARO specific)
6.10 (vanilla and MANJARO specific)
Again, thank you !
system
Closed
August 4, 2024, 7:09am
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.