Kernel – 6.8 Pre-testing – Breaks NVIDIA and VMware – VMware fix available..
As kernel 6.8-rc1 is due in about a weeks time, I tested the Jan 14th version from Git, and both the latest NVIDIA 545.29.06 and VMware 17.5.0 failed..
NVIDIA:
Multiple occurrences of ‘warning: no previous prototype‘ and then:
................
In file included from /home/rgadsdon/NVIDIA-Linux-x86_64-545.29.06/kernel/nvidia-drm/nvidia-drm-drv.c:64:
/home/rgadsdon/NVIDIA-Linux-x86_64-545.29.06/kernel/nvidia-drm/nvidia-drm-drv.c:1489:40: error: ‘DRM_UNLOCKED’ undeclared here (not in a function); did you mean ‘VM_LOCKED’?
1489 | DRM_RENDER_ALLOW|DRM_UNLOCKED),
| ^~~~~~~~~~~~
./include/drm/drm_ioctl.h:155:26: note: in definition of macro ‘DRM_IOCTL_DEF_DRV’
155 | .flags = _flags, \
| ^~~~~~
make[3]: *** [scripts/Makefile.build:243: /home/rgadsdon/NVIDIA-Linux-x86_64-545.29.06/kernel/nvidia-drm/nvidia-drm-drv.o] Error 1
make[2]: *** [/usr/src/linux-6.8-rc00/Makefile:1912: /home/rgadsdon/NVIDIA-Linux-x86_64-545.29.06/kernel] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.8-rc00'
make: *** [Makefile:82: modules] Error 2
Making the suggested replacement results in a successful compile, but (not surprisingly!) the resulting code fails to run..
VMware:
Has a similar rash of ‘warning: no previous prototype‘ messages, and then:
.........................
In file included from /tmp/modconfig-aLYvSn/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Werror=implicit-function-declaration]
12 | return random_get_entropy_fallback();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| random_get_entropy
………………..
Fortunately, there is already a fix for this, at:
https://github.com/mkubecek/vmware-host-modules/tree/tmp/workstation-17.5.0-k6.8
I have tested this, and it fixes the problem with the current version of the kernel code….
Robert Gadsdon. January 15th 2024.
Hello Robert,
I’ve been able to compile + boot the 6.8-rc1 pre-release with the following changes.
I’ve changed the ‘|DROM_UNLOCK’ stuff with ‘|0’ (that’s a zero) and ‘DRM_UNLOCK|’ with ‘0|’ in nvidia-drm-drv.c.
See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2798ffcc1d6a788b5769b1fbcf0750dfc06ae98a
Perhaps this can even be omitted completely?
That seems to do the trick. But when compiling the DKMS modules I got some GPL errors for which I created a patch for the kernel source itself for the files: arch/x86/kernel/alternative.c and kernel/rcu/tree_plugin.h
Hope this helps…
I used this kernel commit for this ‘experiment’:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d1694dc91ce7b80bc96d6d8eaf1a1eca668d847
diff -rupN linux-6.8-rc1/arch/x86/kernel/alternative.c linux-6.8-rc1p/arch/x86/kernel/alternative.c
— linux-6.8-rc1/arch/x86/kernel/alternative.c 2024-01-19 03:22:40.000000000 +0100
+++ linux-6.8-rc1p/arch/x86/kernel/alternative.c 2024-01-19 14:06:22.727924046 +0100
@@ -403,7 +403,7 @@ noinstr void BUG_func(void)
{
BUG();
}
-EXPORT_SYMBOL_GPL(BUG_func);
+EXPORT_SYMBOL(BUG_func);
#define CALL_RIP_REL_OPCODE 0xff
#define CALL_RIP_REL_MODRM 0x15
diff -rupN linux-6.8-rc1/kernel/rcu/tree_plugin.h linux-6.8-rc1p/kernel/rcu/tree_plugin.h
— linux-6.8-rc1/kernel/rcu/tree_plugin.h 2024-01-19 03:22:40.000000000 +0100
+++ linux-6.8-rc1p/kernel/rcu/tree_plugin.h 2024-01-19 14:05:48.555779664 +0100
@@ -406,7 +406,7 @@ void __rcu_read_lock(void)
WRITE_ONCE(current->rcu_read_unlock_special.b.need_qs, true);
barrier(); /* critical section after entry code. */
}
-EXPORT_SYMBOL_GPL(__rcu_read_lock);
+EXPORT_SYMBOL(__rcu_read_lock);
/*
* Preemptible RCU implementation for rcu_read_unlock().
@@ -431,7 +431,7 @@ void __rcu_read_unlock(void)
WARN_ON_ONCE(rrln RCU_NEST_PMAX);
}
}
-EXPORT_SYMBOL_GPL(__rcu_read_unlock);
+EXPORT_SYMBOL(__rcu_read_unlock);
/*
* Advance a ->blkd_tasks-list pointer to the next entry, instead
Thanks for this.. I’ve been having odd issues with the interim pre versions of 6.8, and the kernel.org version (with debugging deselected) does not throw the GPL errors with NVIDIA 535.154.05, but the Fedora 40 version _does_.. For some reason, the graphics console works, but the text one does not, although it does work on the F40 version.. There seems to be some strange issue with fonts.. I’m waiting for the ‘real’ -rc1 before more testing…
RG.
DROM_UNLOCK should be DRM_UNLOCK of course…