{"id":3027,"date":"2022-05-29T18:50:53","date_gmt":"2022-05-30T01:50:53","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=3027"},"modified":"2022-06-03T22:17:23","modified_gmt":"2022-06-04T05:17:23","slug":"kernel-5-19-pre-testing-breaks-nvidia-and-vmware-so-far","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=3027","title":{"rendered":"Kernel &#8211; 5.19 Pre-testing &#8211; Breaks NVIDIA and VMware.. Updated&#8230;"},"content":{"rendered":"<p>Kernel 5.19-rc1 should be released in a weeks time, but many changes have already been submitted..\u00a0\u00a0\u00a0 I created a <span style=\"font-family: Courier New, Courier, monospace;\"><strong>5.19-rc0<\/strong><\/span> (git) version from changes up to May 29th, and the following are the test results &#8211; <em>Update: Changes also tested OK with June 3rd git version of 5.19-rc.<\/em>.(<em>note that any changes were made using logic, rather than coding skills, so these may <span style=\"text-decoration: underline;\">not<\/span> be technically correct!<\/em>):<\/p>\n<p>NVIDIA:<br \/>\nTested with driver <strong>515.43.04<\/strong>, and the compile fails:<br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-drm\/nvidia-dma-resv-helper.h:72:5: error: implicit declaration of function \u2018dma_resv_add_excl_fence\u2019; did you mean \u2018nv_dma_resv_add_excl_fence\u2019? [-Werror=implicit-function-declaration]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">72 | dma_resv_add_excl_fence(obj, fence);<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| nv_dma_resv_add_excl_fence<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/span><\/strong><br \/>\nI managed to fix this by editing:<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-drm\/nvidia-dma-resv-helper.h<br \/>\nLine 72 &#8211; change<br \/>\nnv_dma_resv_add_excl_fence<br \/>\n<\/strong><\/span>to<br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">dma_resv_add_excl_fence<br \/>\n<\/span><\/strong><span style=\"font-family: Georgia, Times, serif;\">and:<\/span><strong><span style=\"font-family: Courier New, Courier, monospace;\"><br \/>\n<\/span><\/strong><span style=\"font-family: Courier New, Courier, monospace;\"><strong>NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-drm\/nvidia-drm-prime-fence.c<\/strong><\/span><br \/>\nLine <strong>502<\/strong> &#8211; change<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>nv_dma_resv_add_excl_fence<\/strong><\/span><br \/>\nto<br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">dma_resv_add_excl_fence<\/span><\/strong><\/p>\n<p>Then the driver compiles successfully, but with many warnings (some due to gcc 12.1.1&#8230;)<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>ld -r -o \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-modeset\/nv-modeset-interface.o \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-modeset\/nvidia-modeset-linux.o \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-modeset\/nv-kthread-q.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>MODPOST \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/Module.symvers<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-drm.mod.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>LD [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-drm.ko<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-modeset.mod.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>LD [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-modeset.ko<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-peermem.mod.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>LD [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-peermem.ko<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-uvm.mod.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>LD [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia-uvm.ko<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia.mod.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>LD [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-515.43.04\/kernel\/nvidia.ko<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make[1]: Leaving directory &#8216;\/usr\/src\/linux-5.19-rc0&#8217;<\/strong><\/span><\/p>\n<p>Testing with KDE\/Plasma, everything seems to work OK..<\/p>\n<p>VMware:<br \/>\nTested with latest 5.18-patched version of <strong>16.2.3<\/strong>.\u00a0\u00a0\u00a0 <strong>vmmon<\/strong> compiles OK, but <strong>vmnet<\/strong> fails:<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong> LD [M] \/tmp\/modconfig-hZeX0D\/vmnet-only\/vmnet.o<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>MODPOST \/tmp\/modconfig-hZeX0D\/vmnet-only\/Module.symvers<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>ERROR: modpost: &#8220;csum_and_copy_to_user&#8221; [\/tmp\/modconfig-hZeX0D\/vmnet-only\/vmnet.ko] undefined!<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make[2]: *** [scripts\/Makefile.modpost:134: \/tmp\/modconfig-hZeX0D\/vmnet-only\/Module.symvers] Error 1<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make[1]: *** [Makefile:1753: modules] Error 2<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make[1]: Leaving directory &#8216;\/usr\/src\/linux-5.19-rc0&#8217;<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make: *** [Makefile:117: vmnet.ko] Error 2<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>make: Leaving directory &#8216;\/tmp\/modconfig-hZeX0D\/vmnet-only&#8217;<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>Unable to install all modules. See log for details.<\/strong><\/span><\/p>\n<p>This would appear to be caused by the following kernel code change:<br \/>\n&#8220;<span style=\"font-family: Courier New, Courier, monospace;\">[PATCH] net: unexport csum_and_copy_{from,to}_user<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">csum_and_copy_from_user and csum_and_copy_to_user are exported by<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">a few architectures, but not actually used in modular code. Drop<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">the exports.<\/span>&#8221;<br \/>\nSee <a href=\"https:\/\/lkml.org\/lkml\/2022\/4\/21\/214\" target=\"_blank\" rel=\"noopener\">https:\/\/lkml.org\/lkml\/2022\/4\/21\/214<\/a> for details..<\/p>\n<p>Obviously there will be many further changes to come, but this gives an early-warning..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 May 29th 2022.<br \/>\nUpdated June 3rd, to include missing code line change for NVIDIA fix..<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kernel 5.19-rc1 should be released in a weeks time, but many changes have already been submitted..\u00a0\u00a0\u00a0 I created a 5.19-rc0 (git) version from changes up to May 29th, and the following are the test results &#8211; Update: Changes also tested OK with June 3rd git version of 5.19-rc..(note that any changes were made using logic, rather than <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=3027\"><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,11,14,15,18,19,25],"tags":[1367,2480,2478,2481,2479],"class_list":["post-3027","post","type-post","status-publish","format-standard","hentry","category-compilation","category-hacks","category-kernel","category-linux-2","category-nvidia","category-opinion","category-vmware","tag-breaks-nvidia-and-vmware","tag-csum_and_copy_to_user-unexported","tag-early-testing","tag-kernel-5-19-rc0","tag-possible-nvidia-workaround"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3027","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=3027"}],"version-history":[{"count":4,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3027\/revisions"}],"predecessor-version":[{"id":3035,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3027\/revisions\/3035"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}