Bug 96841 - FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'cpu_tss'
Summary: FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'cpu_tss'
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(Other) (show other bugs)
Hardware: x86-64 Linux
: P1 blocking
Assignee: drivers_video-other
URL:
Keywords: trivial
Depends on:
Blocks:
 
Reported: 2015-04-18 13:12 UTC by Christian
Modified: 2016-06-09 12:26 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.0.0+
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel configuration file. (165.66 KB, application/octet-stream)
2015-04-18 13:12 UTC, Christian
Details
Changes the export method to original. (621 bytes, patch)
2015-04-18 19:35 UTC, Christian
Details | Diff

Description Christian 2015-04-18 13:12:48 UTC
Created attachment 174361 [details]
Kernel configuration file.

This change happened from 4.0.0-rc6+ to 4.0.0+.
Someone decide to make this symbol GPL only and blocked the compilation of NVidia proprietary drivers to the whole world.
Here's the complete compilation error for which there's no workaround.

--------------------------------------------------------------------------------
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Apr 18 00:07:01 2015
installer version: 346.59

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/src/unrealengine/Engine/Binaries/Linux:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2:/opt/nvidia-cg-toolkit/bin

nvidia-installer command line:
    ./nvidia-installer

Using: nvidia-installer ncurses user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> License accepted.
-> Installing NVIDIA driver version 346.59.
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: '/lib/modules/4.0.0+/source'
-> Kernel output path: '/lib/modules/4.0.0+/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; /usr/bin/make clean'...
-> Building NVIDIA kernel module:
   executing: 'cd ./kernel; /usr/bin/make module SYSSRC=/lib/modules/4.0.0+/source SYSOUT=/lib/modules/4.0.0+/build -j8  NV_BUILD_MODULE_INSTANCES='...
   NVIDIA: calling KBUILD...
   make[1]: Entering directory '/usr/src/linux'
   /usr/bin/make -C /lib/modules/4.0.0+/build KBUILD_SRC=/usr/src/linux \
   -f /usr/src/linux/Makefile modules
   make[2]: Entering directory '/usr/src/linux'
...

scripts/mod/modpost -m -a -i ./Module.symvers -I /tmp/selfgz4400/NVIDIA-Linux-x86_64-346.59/kernel/Module.symvers  -o /tmp/selfgz4400/NVIDIA-Linux-x86_64-346.59/kernel/Module.symvers -S -w  -s -T -
   WARNING: could not find /tmp/selfgz4400/NVIDIA-Linux-x86_64-346.59/kernel/.nv-kernel.o.cmd for /tmp/selfgz4400/NVIDIA-Linux-x86_64-346.59/kernel/nv-kernel.o
   FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'cpu_tss'
   /usr/src/linux/scripts/Makefile.modpost:90: recipe for target '__modpost' failed
   make[3]: *** [__modpost] Error 1
   /usr/src/linux/Makefile:1386: recipe for target 'modules' failed
   make[2]: *** [modules] Error 2
   make[2]: Leaving directory '/usr/src/linux'
   Makefile:146: recipe for target 'sub-make' failed
   make[1]: *** [sub-make] Error 2
   make[1]: Leaving directory '/usr/src/linux'
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   nvidia-modules-common.mk:248: recipe for target 'module' failed
   make: *** [module] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
Comment 1 Christian 2015-04-18 19:31:09 UTC
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 8213da6..bfc99b3 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -57,7 +57,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
 	.io_bitmap		= { [0 ... IO_BITMAP_LONGS] = ~0 },
 #endif
 };
-EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss);
+EXPORT_PER_CPU_SYMBOL(cpu_tss);
 
 #ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);
Comment 2 Christian 2015-04-18 19:35:12 UTC
Created attachment 174381 [details]
Changes the export method to original.

Note You need to log in before you can comment on or make changes to this bug.