LTS kernel patch for Intel CPU vulnerability breaks nvidia driver

I am updating a couple machines that run the 4.14 LTS kernel. Today, 4.14.11 was released that closes the Intel CPU bug vulnerability.

The nvidia driver builds and works fine on 4.14.10. However, the patch that closed the security flaw breaks the nvidia build:

FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘cpu_tlbstate’

This is nvidia driver 387.34 (64-bit.) There seems to be a bit of a panic right now about this CPU bug, and it kind of feels very important to run a fixed kernel, especially since one of the machines runs a couple VMs.

Is there an advisory from nvidia on how to proceed? I feel this is important.

Ah, Linux kernel developers are fucking with their users again. I’m surprised. Not.

Meanwhile you can patch NVIDIA’s kernel wrapper and change its license to GPL - that will fix your issue.

That’ll be something like this:

diff -urN NVIDIA-Linux-x86_64-384.98/kernel/nvidia/nv.c NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia/nv.c
--- NVIDIA-Linux-x86_64-384.98/kernel/nvidia/nv.c	2017-10-26 23:19:51.000000000 +0000
+++ NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia/nv.c	2018-01-03 11:11:11.642969571 +0000
@@ -40,7 +40,7 @@
 
 #if (NV_BUILD_MODULE_INSTANCES != 0)
 #if defined(MODULE_LICENSE)
-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");
 #endif
 #if defined(MODULE_INFO)
 MODULE_INFO(supported, "external");
diff -urN NVIDIA-Linux-x86_64-384.98/kernel/nvidia/nv-frontend.c NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia/nv-frontend.c
--- NVIDIA-Linux-x86_64-384.98/kernel/nvidia/nv-frontend.c	2017-10-26 23:19:52.000000000 +0000
+++ NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia/nv-frontend.c	2018-01-03 11:11:34.569635270 +0000
@@ -15,7 +15,7 @@
 #include "nv-frontend.h"
 
 #if defined(MODULE_LICENSE)
-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");
 #endif
 #if defined(MODULE_INFO)
 MODULE_INFO(supported, "external");
diff -urN NVIDIA-Linux-x86_64-384.98/kernel/nvidia-modeset/nvidia-modeset-linux.c NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia-modeset/nvidia-modeset-linux.c
--- NVIDIA-Linux-x86_64-384.98/kernel/nvidia-modeset/nvidia-modeset-linux.c	2017-10-26 23:19:56.000000000 +0000
+++ NVIDIA-Linux-x86_64-384.98-new/kernel/nvidia-modeset/nvidia-modeset-linux.c	2018-01-03 11:12:20.209633345 +0000
@@ -1309,7 +1309,7 @@
 module_exit(nvkms_exit);
 
 #if defined(MODULE_LICENSE)
-  MODULE_LICENSE("NVIDIA");
+  MODULE_LICENSE("GPL");
 #endif
 #if defined(MODULE_INFO)
   MODULE_INFO(supported, "external");

I suspect you only need to patch nv.c.

I needed to patch all three files to get the drivers to compile.

I ended up patching the kernel instead, which only requires a single edit in arch/x86/mm/init.c:

EXPORT_SYMBOL_GPL(cpu_tlbstate);

needs to be:

EXPORT_SYMBOL(cpu_tlbstate);

If you don’t build your own kernels though, then patching the driver is necessary.

Interesting, the cpu_tlbstate symbol was GPL also in 4.14.10, and the compilation went fine

The nvidia driver is not linking to it explicitly, the kernel changes put this in the code for context switches. Or something like that…so it’s used involuntarily.

Hi nvidia linux gurus,

the 2018 hast started like in Hitchcock’s movie with a small earthquake - intel CPU vulnerability opens any single intel based machine with friendly welcome greetings.

I’d like to look closer to the performance issues after KAISER patch and the easiest way was to upgrade my desktop on 4.10 kernel to 4.15 but I’m facing nvidia driver issue.

I found in the folder “/usr/src/nvidia-384-384.90/patches” a patch for 4.14, shall I apply it before applying the one from the birdie’s post above?

My build log shows many more issues:

DKMS make.log for nvidia-384-384.90 for kernel 4.15.0-041500rc6-generic (x86_64)
Do 4. Jan 17:45:45 CET 2018
make "CC=cc"  KBUILD_VERBOSE= -C /lib/modules/4.15.0-041500rc6-generic/build M=/var/lib/dkms/nvidia-384/384.90/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.15.0-041500rc6-generic/build NV_KERNEL_OUTPUT=/lib/modules/4.15.0-041500rc6-generic/build NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset nvidia-drm" INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-041500rc6-generic'
  SYMLINK /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-kernel.o
  SYMLINK /var/lib/dkms/nvidia-384/384.90/build/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: INIT_WORK
 CONFTEST: remap_pfn_range
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: follow_pfn
 CONFTEST: vmap
 CONFTEST: set_pages_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: set_memory_uc
 CONFTEST: pci_choose_state
 CONFTEST: change_page_attr
 CONFTEST: vm_insert_page
 CONFTEST: pci_get_class
 CONFTEST: acpi_device_id
 CONFTEST: acquire_console_sem
 CONFTEST: console_lock
 CONFTEST: kmem_cache_create
 CONFTEST: on_each_cpu
 CONFTEST: smp_call_function
 CONFTEST: acpi_evaluate_integer
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: acpi_walk_namespace
 CONFTEST: pci_domain_nr
 CONFTEST: pci_dma_mapping_error
 CONFTEST: sg_alloc_table
 CONFTEST: sg_init_table
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: efi_enabled
 CONFTEST: proc_create_data
 CONFTEST: pde_data
 CONFTEST: proc_remove
 CONFTEST: pm_vt_switch_required
 CONFTEST: phys_to_dma
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: get_dma_ops
 CONFTEST: write_cr4
 CONFTEST: of_get_property
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: for_each_online_node
 CONFTEST: node_end_pfn
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_remove_bus_device
 CONFTEST: request_threaded_irq
 CONFTEST: cpuhp_setup_state
 CONFTEST: register_cpu_notifier
 CONFTEST: remap_page_range
 CONFTEST: address_space_init_once
 CONFTEST: kbasename
 CONFTEST: list_cut_position
 CONFTEST: vzalloc
 CONFTEST: fatal_signal_pending
 CONFTEST: bitmap_clear
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: usleep_range
 CONFTEST: radix_tree_empty
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: drm_atomic_set_mode_for_crtc
 CONFTEST: drm_atomic_clean_old_fb
 CONFTEST: get_user_pages_remote
 CONFTEST: drm_gem_object_lookup
 CONFTEST: drm_atomic_state_free
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: drm_driver_has_gem_prime_res_obj
 CONFTEST: i2c_adapter
 CONFTEST: pm_message_t
 CONFTEST: irq_handler_t
 CONFTEST: acpi_device_ops
 CONFTEST: acpi_op_remove
 CONFTEST: outer_flush_all
 CONFTEST: proc_dir_entry
 CONFTEST: scatterlist
 CONFTEST: sg_table
 CONFTEST: file_operations
 CONFTEST: vm_operations_struct
 CONFTEST: atomic_long_type
 CONFTEST: pci_save_state
 CONFTEST: file_inode
 CONFTEST: task_struct
 CONFTEST: dma_ops
 CONFTEST: kuid_t
 CONFTEST: dma_map_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_present
 CONFTEST: vm_fault_has_address
 CONFTEST: kernel_write
 CONFTEST: strnstr
 CONFTEST: iterate_dir
 CONFTEST: kstrtoull
 CONFTEST: fault_flags
 CONFTEST: atomic64_type
 CONFTEST: address_space
 CONFTEST: backing_dev_info
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: mm_context_t
 CONFTEST: pnv_npu2_init_context
 CONFTEST: drm_bus_present
 CONFTEST: drm_bus_has_bus_type
 CONFTEST: drm_bus_has_get_irq
 CONFTEST: drm_bus_has_get_name
 CONFTEST: drm_driver_has_legacy_dev_list
 CONFTEST: drm_driver_has_set_busid
 CONFTEST: drm_crtc_state_has_connectors_changed
 CONFTEST: drm_universal_plane_init_has_modifier_name_arg
 CONFTEST: drm_crtc_helper_funcs_has_atomic_enable
 CONFTEST: drm_init_functions_have_name_arg
 CONFTEST: drm_mode_connector_list_update_has_merge_type_bits_arg
 CONFTEST: drm_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_mode_config_funcs_has_atomic_state_alloc
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: drm_available
 CONFTEST: nvidia_grid_build
 CONFTEST: drm_atomic_modeset_nonblocking_commit_available
 CONFTEST: drm_atomic_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-frontend.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-instance.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-acpi.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-chrdev.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-cray.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-dma.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gvi.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-mempool.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-i2c.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-mmap.o
In file included from /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:26:0:
/var/lib/dkms/nvidia-384/384.90/build/common/inc/nvmisc.h:56:0: warning: "BIT" redefined
 #define BIT(b)                  (1<<(b))
 ^
In file included from ./include/linux/kernel.h:11:0,
                 from ./include/linux/list.h:9,
                 from ./include/linux/preempt.h:11,
                 from ./include/linux/spinlock.h:51,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-lock.h:16,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-linux.h:19,
                 from /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:24:
./include/linux/bitops.h:7:0: note: this is the location of the previous definition
 #define BIT(nr)   (1UL << (nr))
 ^
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c: In function ‘bad_idea_read_string_from_file’:
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:123:39: warning: passing argument 3 of ‘kernel_read’ makes integer from pointer without a cast [-Wint-conversion]
     read_count = kernel_read(filp, 0, read_buffer, read_buffer_size - 1);
                                       ^
In file included from ./include/linux/huge_mm.h:7:0,
                 from ./include/linux/mm.h:463,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-pgprot.h:17,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-linux.h:20,
                 from /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:24:
./include/linux/fs.h:2842:16: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char *’
 extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
                ^
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:123:52: warning: passing argument 4 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
     read_count = kernel_read(filp, 0, read_buffer, read_buffer_size - 1);
                                                    ^
In file included from ./include/linux/huge_mm.h:7:0,
                 from ./include/linux/mm.h:463,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-pgprot.h:17,
                 from /var/lib/dkms/nvidia-384/384.90/build/common/inc/nv-linux.h:20,
                 from /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-gpu-numa.c:24:
./include/linux/fs.h:2842:16: note: expected ‘loff_t * {aka long long int *}’ but argument is of type ‘size_t {aka long unsigned int}’
 extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
                ^
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-p2p.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-pat.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-procfs.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-usermap.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-vm.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/nv-vtophys.o
  CC [M]  /var/lib/dkms/nvidia-384/384.90/build/nvidia/os-interface.o
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.c: In function ‘nv_start_rc_timer’:
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.c:3206:5: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
     init_timer(&nvl->rc_timer);
     ^
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.c:3207:28: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     nvl->rc_timer.function = nvidia_rc_timer;
                            ^
/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.c:3208:18: error: ‘struct timer_list’ has no member named ‘data’
     nvl->rc_timer.data = (unsigned long) nvl;
                  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:310: recipe for target '/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.o' failed
make[2]: *** [/var/lib/dkms/nvidia-384/384.90/build/nvidia/nv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1511: recipe for target '_module_/var/lib/dkms/nvidia-384/384.90/build' failed
make[1]: *** [_module_/var/lib/dkms/nvidia-384/384.90/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-041500rc6-generic'
Makefile:81: recipe for target 'modules' failed
make: *** [modules] Error 2

Any advice would be very welcome,
best regards
Beny

my system:
Kernel : Linux 4.10.0-42-generic x86_64
Renderer : GeForce GTX 750 Ti/PCIe/SSE2
Version : 4.5.0 NVIDIA 384.90

@beny51: why dont you just take driver 387.34?

@generix, what about the driver from today?

Version: 384.111
Release Date: 2018.1.4
Operating System: Linux 64-bit
Language: English (US)
File Size: 77.25 MB

Anyway I tried 387.34 via ppa:graphics-drivers/ppa and the problem still exists

DKMS make.log for nvidia-387-387.34 for kernel 4.15.0-041500rc6-generic (x86_64)
Do 4. Jan 21:04:59 CET 2018
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-041500rc6-generic'
  SYMLINK /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-kernel.o
  SYMLINK /var/lib/dkms/nvidia-387/387.34/build/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: INIT_WORK
 CONFTEST: remap_pfn_range
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: vmap
 CONFTEST: set_pages_uc
 CONFTEST: set_memory_uc
 CONFTEST: follow_pfn
 CONFTEST: set_memory_array_uc
 CONFTEST: change_page_attr
 CONFTEST: pci_choose_state
 CONFTEST: pci_get_class
 CONFTEST: vm_insert_page
 CONFTEST: acpi_device_id
 CONFTEST: acquire_console_sem
 CONFTEST: console_lock
 CONFTEST: kmem_cache_create
 CONFTEST: on_each_cpu
 CONFTEST: smp_call_function
 CONFTEST: acpi_evaluate_integer
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: acpi_walk_namespace
 CONFTEST: pci_domain_nr
 CONFTEST: pci_dma_mapping_error
 CONFTEST: sg_alloc_table
 CONFTEST: sg_init_table
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: efi_enabled
 CONFTEST: pde_data
 CONFTEST: proc_create_data
 CONFTEST: proc_remove
 CONFTEST: pm_vt_switch_required
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: write_cr4
 CONFTEST: of_get_property
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: for_each_online_node
 CONFTEST: node_end_pfn
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_remove_bus_device
 CONFTEST: request_threaded_irq
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: backlight_device_register
 CONFTEST: remap_page_range
 CONFTEST: address_space_init_once
 CONFTEST: kbasename
 CONFTEST: fatal_signal_pending
 CONFTEST: vzalloc
 CONFTEST: list_cut_position
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: bitmap_clear
 CONFTEST: usleep_range
 CONFTEST: radix_tree_empty
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: drm_atomic_set_mode_for_crtc
 CONFTEST: drm_atomic_clean_old_fb
 CONFTEST: get_user_pages_remote
 CONFTEST: drm_gem_object_lookup
 CONFTEST: drm_atomic_state_free
 CONFTEST: drm_atomic_helper_disable_all
 CONFTEST: drm_driver_has_gem_prime_res_obj
 CONFTEST: drm_atomic_helper_set_config
 CONFTEST: drm_atomic_helper_connector_dpms
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: i2c_adapter
 CONFTEST: pm_message_t
 CONFTEST: irq_handler_t
 CONFTEST: acpi_device_ops
 CONFTEST: acpi_op_remove
 CONFTEST: outer_flush_all
 CONFTEST: proc_dir_entry
 CONFTEST: scatterlist
 CONFTEST: sg_table
 CONFTEST: file_operations
 CONFTEST: vm_operations_struct
 CONFTEST: atomic_long_type
 CONFTEST: pci_save_state
 CONFTEST: file_inode
 CONFTEST: task_struct
 CONFTEST: kuid_t
 CONFTEST: dma_ops
 CONFTEST: dma_map_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_present
 CONFTEST: vm_fault_has_address
 CONFTEST: kernel_write
 CONFTEST: strnstr
 CONFTEST: iterate_dir
 CONFTEST: kstrtoull
 CONFTEST: backlight_properties_type
 CONFTEST: fault_flags
 CONFTEST: atomic64_type
 CONFTEST: address_space
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: pnv_npu2_init_context
 CONFTEST: drm_bus_present
 CONFTEST: drm_bus_has_bus_type
 CONFTEST: drm_bus_has_get_irq
 CONFTEST: drm_bus_has_get_name
 CONFTEST: drm_driver_has_legacy_dev_list
 CONFTEST: drm_driver_has_set_busid
 CONFTEST: drm_crtc_state_has_connectors_changed
 CONFTEST: drm_init_function_args
 CONFTEST: drm_mode_connector_list_update_has_merge_type_bits_arg
 CONFTEST: drm_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_mode_config_funcs_has_atomic_state_alloc
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: kref_has_refcount_of_type_refcount_t
 CONFTEST: drm_crtc_helper_funcs_has_atomic_enable
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: drm_available
 CONFTEST: drm_atomic_available
 CONFTEST: drm_atomic_modeset_nonblocking_commit_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-gpu-numa.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-acpi.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-chrdev.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-cray.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-dma.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-gvi.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-i2c.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-mempool.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-mmap.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-p2p.o
  CC [M]  /var/lib/dkms/nvidia-387/387.34/build/nvidia/nv-pat.o
/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.c: In function ‘nv_start_rc_timer’:
/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.c:3389:5: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
     init_timer(&nvl->rc_timer);
     ^
/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.c:3390:28: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     nvl->rc_timer.function = nvidia_rc_timer;
                            ^
/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.c:3391:18: error: ‘struct timer_list’ has no member named ‘data’
     nvl->rc_timer.data = (unsigned long) nvl;
                  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:310: recipe for target '/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.o' failed
make[2]: *** [/var/lib/dkms/nvidia-387/387.34/build/nvidia/nv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1511: recipe for target '_module_/var/lib/dkms/nvidia-387/387.34/build' failed
make[1]: *** [_module_/var/lib/dkms/nvidia-387/387.34/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-041500rc6-generic'
Makefile:84: recipe for target 'modules' failed
make: *** [modules] Error 2

384.111 and 390.12 also result in a Kernel Panic

Strangely I didn’t need to patch either the kernel or the drivers to make 'em work.

NVIDIA 384.98 + Kernel 4.14.12 work just fine.

Please try 4.15.x! “Kaiser” cpu vulnerability patch is included in the latest 4.15.x

For the 4.14 there is related patch and that was also my question if it is enough to patch it with it: “buildfix_kernel_4.14.patch” to go for 4.15.x

Regards
Beny

Update: Ubuntu released new update: USN-3521-1: NVIDIA graphics drivers vulnerability | Ubuntu security notices | Ubuntu
And the patched kernel 4.10 is 4.10.0.42.46

– Issue solved –