nvidia-driver is now at 375.39 upstream. Now it includes 2nd hunk of the freebsd patch below. files/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c Eliminating 2nd hunk of the patch above allows build, and running fine for me. But I'm not 100% shure that no other change is needed or not. Tested only on amd64. Not at all tested on i386.
Created attachment 180276 [details] Minimal diff Just a diff for affected patch. Need updating Makefile and distinfo to merge. Version check on Makefile should be needed for ones who want to use 358.009 <= NVVERSION < 375.39 via setting DISTVERSION.
Created attachment 180292 [details] patch This patch updates all nvidia-driver* ports. 304.135 also fixes bug 216574.
Sorry for looong delay. Your patch works fine. But we should have 4 options for now. a) Commit your patch as is. b) Fix further to allow building 358.009 <= NVVERSION < 375.39 via setting DISTVERSION and -DNO_CHECKSUM. c) Update patch for 378.13, as x11/nvidia-settings is at 378.13. d) Same as b), but update for 378.13. keeping x11/nvidia-driver and x11/nvidia-settings in sync would be worth considering, but 378.13 is Short Lived Branch, while 375.39 is Long Lived Branch. Which should be preferred? Mostly, catching up with latest vesion would be OK, but someone who needs older version (of same branch) with some reason (ex. problems depending on specific chips) can require b) or d).
This works for me as well on amd64 Also this addresses this security issue: http://nvidia.custhelp.com/app/answers/detail/a_id/4398
Created attachment 181212 [details] Implementation of Option b from Tomoaki AOKI's comment. Implementation of Option b from Tomoaki AOKI's comment. To be applied on-top of the first patch.
Created attachment 181213 [details] Cumulative option b (for real this time) I quickly realized my error, so I moved the conditional block in the Makefile Sorry for the clutter. This time is cumulative and implements option b from above.
(In reply to Andrew Marks from comment #4) Andrew, thanks for pointing this out. Hopping on CC for now.
A commit references this bug: Author: danfe Date: Mon Apr 3 12:08:33 UTC 2017 New revision: 437618 URL: https://svnweb.freebsd.org/changeset/ports/437618 Log: Update nVidia drivers to their most recent versions: 375.39 (long lived branch); legacy versions: 340.102 and 304.135. PR: 216574, 217341 Changes: head/x11/nvidia-driver/Makefile head/x11/nvidia-driver/distinfo head/x11/nvidia-driver/files/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c head/x11/nvidia-driver-304/Makefile head/x11/nvidia-driver-340/Makefile
A commit references this bug: Author: danfe Date: Tue Apr 4 02:27:16 UTC 2017 New revision: 437678 URL: https://svnweb.freebsd.org/changeset/ports/437678 Log: - Document recent NVIDIA GPU display driver vulnerabilities - Spell "NVIDIA UNIX driver" consistently throughout the file PR: 217341 Changes: head/security/vuxml/vuln.xml
NVidia driver ports were updated as of ports r437618 and vulnerabilities documented in ports r437678, thank you. Ultimately I've decided that maintaining two patches would not buy us much and had committed the patch identical to Tijl's proposal (comment #2).