KERNEL – 4.14.9 Breaks NVIDIA – and a Fix..

Just updated to Kernel 4.14.9, and normally this should not be anything to cause concern, but this time there has been a significant code change made, that has broken NVIDIA (384.98):

.....................
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98/kernel/nvidia-uvm/uvm8_va_block.c: In function ‘block_cpu_fault_locked’:
/usr/src/linux-4.14.9/arch/x86/include/asm/processor.h:826:39: error: implicit declaration of function ‘task_stack_page’; did you mean ‘task_stack_vm_area’? [-Werror=implicit-function-declaration]
 unsigned long __ptr = (unsigned long)task_stack_page(task); \
 ^
/usr/src/linux-4.14.9/arch/x86/include/asm/processor.h:900:26: note: in expansion of macro ‘task_pt_regs’
 #define KSTK_EIP(task) (task_pt_regs(task)->ip)
 ^~~~~~~~~~~~
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98/kernel/nvidia-uvm/uvm8_va_block.c:8771:41: note: in expansion of macro ‘KSTK_EIP’
 KSTK_EIP(current));
 ^~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-4.14.9/scripts/Makefile.build:315: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98/kernel/nvidia-uvm/uvm8_va_block.o] Error 1
make[2]: *** [/usr/src/linux-4.14.9/Makefile:1504: _module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98/kernel] Error 2
make[2]: Leaving directory '/usr/src/linux-4.14.9'
make[1]: *** [Makefile:146: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.14.9'
make: *** [Makefile:81: modules] Error 2

This sort of thing is expected in ‘testing’ -rc kernel versions, but is not supposed to occur in ‘mainline/stable’ versions..

It had already been mentioned in the Kernel mailing list:  http://lkml.iu.edu/hypermail/linux/kernel/1712.3/00099.html

Fortunately, there is a fix, and it is – somewhat ironically – the patch intended for Kernel 4.15 (see http://rglinuxtech.com/?p=2141 ), and with this, the compile/load completes successfully:

............................
ld -r -o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-modeset/nv-modeset-interface.o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-modeset/nvidia-modeset-linux.o
 Building modules, stage 2.
 MODPOST 4 modules
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-drm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-drm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-modeset.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-modeset.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-uvm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia-uvm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-384.98-415/kernel/nvidia.ko
make[2]: Leaving directory '/usr/src/linux-4.14.9'
make[1]: Leaving directory '/usr/src/linux-4.14.9'

It remains to be seen whether this significant change to the stable 4.14 kernel series will be reverted, but – IMHO – it should be!

FYI.. I had seen a report that VMware 14.1.0 was also broken with Kernel 4.14.9, but it seems OK on my system..

Robert Gadsdon.  December 27, 2017.


Leave a Reply

Your email address will not be published. Required fields are marked *