{"id":2471,"date":"2018-08-01T19:05:15","date_gmt":"2018-08-02T02:05:15","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2365"},"modified":"2018-08-01T19:05:15","modified_gmt":"2018-08-02T02:05:15","slug":"nvidia-gpl-problem-with-kernel-4-18-but-only-for-some-fixed-in-4-18-rc7-2","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2471","title":{"rendered":"NVIDIA &#8211; GPL Problem with Kernel 4.18, But only for Some.. Fixed in 4.18-rc7."},"content":{"rendered":"<p>Thanks to <strong><em>towo<\/em><\/strong>, for pointing out that some others have had GPL issues with the latest NVIDIA drivers and Kernel 4.18-rc6, even though they compiled\/loaded OK on my test system, as reported in an earlier article..<\/p>\n<pre><strong><span style=\"font-family: courier new, courier;\">\u2026\u2026\u2026\u2026\u2026<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">ld -r -o \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset\/nv-modeset-interface.o \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset\/nvidia-modeset-linux.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">Building modules, stage 2.<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">MODPOST 4 modules<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-uvm.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-uvm.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[2]: Leaving directory \u2018\/usr\/src\/linux-4.18-rc6\u2019<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[1]: Leaving directory \u2018\/usr\/src\/linux-4.18-rc6\u2019<\/span><\/strong><\/pre>\n<p>See <a href=\"https:\/\/devtalk.nvidia.com\/default\/topic\/1037642\/linux\/driver-390-77-not-compiling-in-kernel-4-18-rc5-xubuntu-18-04\/\" target=\"_blank\" rel=\"noopener\">https:\/\/devtalk.nvidia.com\/default\/topic\/1037642\/linux\/driver-390-77-not-compiling-in-kernel-4-18-rc5-xubuntu-18-04\/<\/a> and other reports..<\/p>\n<p>I changed my usual system-specific kernel config in 4.18-rc6 to the &#8216;Distro&#8217; (Fedora) version, with <em>almost-everything-selected<\/em>, and was then able to reproduce the problem:<\/p>\n<pre><strong><span style=\"font-family: courier new, courier;\">........<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">Building modules, stage 2.<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">MODPOST 4 modules<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__put_devmap_managed_page'<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[3]: *** [\/usr\/src\/linux-4.18-rc6\/scripts\/Makefile.modpost:92: __modpost] Error 1<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[2]: *** [\/usr\/src\/linux-4.18-rc6\/Makefile:1504: modules] Error 2<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[2]: Leaving directory '\/usr\/src\/linux-4.18-rc6'<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[1]: *** [Makefile:146: sub-make] Error 2<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[1]: Leaving directory '\/usr\/src\/linux-4.18-rc6'<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make: *** [Makefile:79: modules] Error 2<\/span><\/strong><\/pre>\n<p>I have checked on the offending code, in <code><strong><span style=\"font-family: courier new, courier;\">linux-4.18-rc6\/kernel\/memremap.c<\/span><\/strong><\/code>, and compared with the same file in 4.18-rc7:<\/p>\n<p>4.18-rc6:<br \/>\n<code><strong><span style=\"font-family: courier new, courier;\"># grep EXPORT_SYMBOL memremap.c<\/span><\/strong><\/code><br \/>\n<code><strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(device_private_entry_fault);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(devm_memremap_pages);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(get_dev_pagemap);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(devmap_managed_key);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(dev_pagemap_get_ops);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(dev_pagemap_put_ops);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(__put_devmap_managed_page);<\/span><\/strong><\/code><\/p>\n<p>4.18-rc7:<br \/>\n<code><strong><span style=\"font-family: courier new, courier;\"># grep EXPORT_SYMBOL memremap.c<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(device_private_entry_fault);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(devm_memremap_pages);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(get_dev_pagemap);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(devmap_managed_key);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(dev_pagemap_get_ops);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL_GPL(dev_pagemap_put_ops);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: courier new, courier;\">EXPORT_SYMBOL(__put_devmap_managed_page);<\/span><\/strong><\/code><\/p>\n<p>So.. It would appear that the problem has been <span style=\"text-decoration: underline;\">fixed<\/span> in 4.18-rc7 (tested with the full &#8216;Distro&#8217; kernel config):<\/p>\n<pre><strong><span style=\"font-family: courier new, courier;\"> .................<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">Building modules, stage 2.<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">MODPOST 4 modules<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-uvm.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-uvm.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia.mod.o<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia.ko<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[2]: Leaving directory '\/usr\/src\/linux-4.18-rc7'<\/span><\/strong>\n<strong><span style=\"font-family: courier new, courier;\">make[1]: Leaving directory '\/usr\/src\/linux-4.18-rc7'<\/span><\/strong><\/pre>\n<p><em>I should mention that using the full &#8216;Distro&#8217; kernel config is not ideal for my test system, as it causes a load of ACPI and other errors at boot time, and is only for a &#8216;generic X86_64&#8217;&#8230;\u00a0 A better solution &#8211; at least for compile-time testing &#8211; would probably be to use a VMware Fedora VM..<\/em><\/p>\n<p><em>Robert Gadsdon.\u00a0 August 1, 2018<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thanks to towo, for pointing out that some others have had GPL issues with the latest NVIDIA drivers and Kernel 4.18-rc6, even though they compiled\/loaded OK on my test system, as reported in an earlier article.. \u2026\u2026\u2026\u2026\u2026 ld -r -o \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset\/nv-modeset-interface.o \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset\/nvidia-modeset-linux.o Building modules, stage 2. MODPOST 4 modules CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.mod.o LD [M] \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-drm.ko CC \/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-390.77\/kernel\/nvidia-modeset.mod.o LD <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2471\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,15,18,19],"tags":[1940,1936,1938,1906,1939,277,1937],"class_list":["post-2471","post","type-post","status-publish","format-standard","hentry","category-compilation","category-linux-2","category-nvidia","category-opinion","tag-fixed-in-4-18-rc7","tag-gpl","tag-inconsistent","tag-kernel-4-18","tag-no-error-on-some-systems","tag-nvidia-2","tag-__put_devmap_managed_page"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2471"}],"version-history":[{"count":0,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2471\/revisions"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}