{"id":2679,"date":"2020-02-06T15:06:35","date_gmt":"2020-02-06T23:06:35","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2679"},"modified":"2020-02-06T15:06:35","modified_gmt":"2020-02-06T23:06:35","slug":"kernel-pre-release-tests-for-5-6-rc1","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2679","title":{"rendered":"Kernel &#8211; Pre-Release Tests for 5.6-rc1 .."},"content":{"rendered":"<p>Kernel 5.6-rc1 should be out on Sunday, February 9th, but I noticed that early-version-test patches are already available for VMware 15.5.1, here:\u00a0 <a href=\"https:\/\/github.com\/mkubecek\/vmware-host-modules\/tree\/tmp\/workstation-15.5.1-k5.6\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/mkubecek\/vmware-host-modules\/tree\/tmp\/workstation-15.5.1-k5.6<\/a><\/p>\n<p>These patches gave clues to what might affect NVIDIA as well, and I managed to get a GIT version of 5.6-rc1-<em>pre<\/em> (dated February 5th) to compile OK, and was able to use this.\u00a0\u00a0 Of course, there are still changes being made to the kernel source, but the goal was to get some &#8216;advance&#8217; testing done..<\/p>\n<p><code><strong><span style=\"font-family: Courier New, Courier, monospace;\"># uname -a<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">Linux rgz220 5.6.0-rc01 #1 SMP Wed Feb 5 17:08:41 PST 2020 x86_64 x86_64 x86_64 GNU\/Linux<\/span><\/strong><\/code><\/p>\n<p>The patches for VMware worked OK, and it seems to run OK, (after <span style=\"text-decoration: underline;\">brief<\/span> tests..)<\/p>\n<p>For NVIDIA, driver 440.59 compilation failed at several stages, as expected, and clues to changes necessary are found at the kernel patch source <a href=\"https:\/\/lore.kernel.org\/patchwork\/patch\/584202\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u00a0https:\/\/lore.kernel.org\/patchwork\/patch\/584202\/<\/a> (timespec64&#8230;)\u00a0 and <a href=\"https:\/\/lore.kernel.org\/netdev\/20191225172546.GB13378@avx2\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/lore.kernel.org\/netdev\/20191225172546.GB13378@avx2\/<\/a> (convert everything to &#8220;struct proc_ops&#8221;).\u00a0\u00a0\u00a0 There was also a generic change from <strong><span style=\"font-family: Courier New, Courier, monospace;\">ioremap_nocache(phys, size)<\/span><\/strong> to <strong><span style=\"font-family: Courier New, Courier, monospace;\">ioremap(phys, size)<\/span><\/strong> in <strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/common\/inc\/nv-linux.h<\/span><\/strong><br \/>\nThe timespec64 change was relatively simple, to <strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/nvidia\/os-interface.c<\/span><\/strong> , but the &#8220;struct proc_ops&#8221; changes meant going through the affected source and making changes along the way, re-compiling \/ testing as I went..\u00a0 There are good examples of the changes needed at the start of the patch article, to make the job a bit easier.\u00a0 The files changed are:<br \/>\n<code><strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/common\/inc\/nv-linux.h<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/common\/inc\/nv-procfs.h<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/nvidia\/nv-procfs.c<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">NVIDIA-Linux-x86_64-440.59\/kernel\/nvidia\/os-interface.c<\/span><\/strong><\/code><\/p>\n<p>With all these changes, I got the driver to compile, and run, although it gave a tombstone (again!) after <strong><span style=\"font-family: Courier New, Courier, monospace;\"># startx<\/span><\/strong>, but appears to work OK despite this:<\/p>\n<p><code><strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.283386] ------------[ cut here ]------------<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.287605] refcount_t: underflow; use-after-free.<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.292033] WARNING: CPU: 1 PID: 141273 at lib\/refcount.c:28 refcount_warn_saturate+0xa6\/0xf0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.300186] Modules linked in: rfcomm cmac bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc hid_logitech_hidpp joydev hid_logitech_dj nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec drm vmnet(O) vmw_vsock_vmci_transport vsock vmw_vmci vmmon(O) sunrpc vfat fat x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek kvm_intel snd_hda_codec_generic snd_hda_codec_hdmi iTCO_wdt kvm ledtrig_audio irqbypass iTCO_vendor_support snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core crct10dif_pclmul snd_hwdep crc32_pclmul snd_seq snd_seq_device snd_pcm ghash_clmulni_intel intel_cstate intel_uncore hp_wmi sparse_keymap rfkill intel_rapl_perf snd_timer i2c_i801 pcspkr wmi_bmof snd lpc_ich soundcore binfmt_misc crc32c_intel e1000e wmi fuse [last unloaded: syscopyarea]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.377452] CPU: 1 PID: 141273 Comm: Xorg.wrap Tainted: P O 5.6.0-rc01 #1<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.385321] Hardware name: Hewlett-Packard HP Z220 CMT Workstation\/1790, BIOS K51 v01.87 06\/10\/2019<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.394134] RIP: 0010:refcount_warn_saturate+0xa6\/0xf0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.399033] Code: 05 a7 13 cf 00 01 e8 57 8a d0 ff 0f 0b c3 80 3d 95 13 cf 00 00 75 95 48 c7 c7 50 db db 91 c6 05 85 13 cf 00 01 e8 38 8a d0 ff &lt;0f&gt; 0b c3 80 3d 74 13 cf 00 00 0f 85 72 ff ff ff 48 c7 c7 a8 db db<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.417622] RSP: 0018:ffffb8d0810f3da0 EFLAGS: 00010286<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.422692] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.429689] RDX: ffff98994dc5d400 RSI: ffff98994dc58748 RDI: ffff98994dc58748<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.436685] RBP: ffff9899490d7ce8 R08: 0000000000000000 R09: 00000000000003f0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.443680] R10: 0000000000aaaaaa R11: 0000000000000000 R12: ffff9899474132e8<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.450677] R13: ffff989947413000 R14: 0000000000000008 R15: 0000000000000000<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.457679] FS: 00007f41e2abc740(0000) GS:ffff98994dc40000(0000) knlGS:0000000000000000<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.465622] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.471232] CR2: 00007f41e2b10e20 CR3: 0000000406f4c005 CR4: 00000000001606e0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.478233] Call Trace:<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.480522] nv_drm_atomic_helper_disable_all+0xe7\/0x280 [nvidia_drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.486808] nv_drm_master_drop+0x1d\/0x60 [nvidia_drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.491786] drm_drop_master+0x19\/0x30 [drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.495870] drm_master_release+0x8c\/0xb0 [drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.500236] drm_file_free.part.0+0x24a\/0x2c0 [drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.504932] drm_release+0x46\/0x80 [drm]<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.508630] __fput+0xbc\/0x250<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.511456] task_work_run+0x84\/0xa0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.514798] exit_to_usermode_loop+0x95\/0xa0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.518827] do_syscall_64+0x1bc\/0x210<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.522309] entry_SYSCALL_64_after_hwframe+0x44\/0xa9<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.527085] RIP: 0033:0x7f41e2c9b8e7<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.530348] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 &lt;48&gt; 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 e3 fb ff ff<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.548848] RSP: 002b:00007ffe5dc99f78 EFLAGS: 00000246 ORIG_RAX: 0000000000000003<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.556171] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00007f41e2c9b8e7<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.563022] RDX: 00007ffe5dc99f90 RSI: 00000000c04064a0 RDI: 0000000000000003<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.569845] RBP: 00007ffe5dc9a070 R08: 0000000000000000 R09: 00007ffe5dc99e00<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.576690] R10: 000055c65bdb7731 R11: 0000000000000246 R12: 0000000000000003<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.583536] R13: 0000000000000001 R14: 0000000000000000 R15: 00007ffe5dc99f90<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[32517.590384] ---[ end trace 9f09730ade497b97 ]---<\/span><\/strong><\/code><\/p>\n<p>There may be additional patches necessary for the <span style=\"text-decoration: underline;\">released<\/span> version of 5.6-rc1, but at least I now have a good idea of what is needed to get it all working, when the time comes.<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 February 6th 2020.<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kernel 5.6-rc1 should be out on Sunday, February 9th, but I noticed that early-version-test patches are already available for VMware 15.5.1, here:\u00a0 https:\/\/github.com\/mkubecek\/vmware-host-modules\/tree\/tmp\/workstation-15.5.1-k5.6 These patches gave clues to what might affect NVIDIA as well, and I managed to get a GIT version of 5.6-rc1-pre (dated February 5th) to compile OK, and was able to use this.\u00a0\u00a0 Of <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2679\"><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,6,1238,11,14,15,18,19,1533,350,25],"tags":[2164,2166,1175,362,2165],"class_list":["post-2679","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-fix","category-hacks","category-kernel","category-linux-2","category-nvidia","category-opinion","category-patches","category-success","category-vmware","tag-kernel-5-6-rc1-pre-release","tag-nvidia-440-59-patches","tag-success","tag-testing","tag-vmware-15-5-1-patch"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2679","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=2679"}],"version-history":[{"count":5,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2679\/revisions"}],"predecessor-version":[{"id":2684,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2679\/revisions\/2684"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}