News for hackers. Stuff that matters.
Re:Nvidia releases open-source GPU kernel modules by mjg59 on Wednesday May 11, 2022 @04:43PM (#31345497)
1) This is unambiguously Good News

2) This is not upstreamable in its current form (nvidia admit this in their press release)

3) In an ideal world, nouveau (the open source driver for nvidia hardware) would be able to target this kernel code. Right now though there's no commitment for any sort of stable userland ABI, and that makes that difficult (moving to a new driver version may break interfaces that nouveau uses)

The press release does say that they have plans to figure out a more upstream friendly approach in the long term, which is great - and what has been released will undoubtedly help development of the existing nouveau codebase.

Re:Nvidia releases open-source GPU kernel modules by mort96 on Wednesday May 11, 2022 @08:45PM (#31347879)
Sadly, it's also not the actual GPU driver, just the kernel part; you still need their massive closed blob in userspace. Almost had me excited there for a moment.
Re:Nvidia releases open-source GPU kernel modules by adrian_b on Thursday May 12, 2022 @03:17AM (#31350288)
While this is not as good as an open-source GPU driver, it is nonetheless a significant progress, which cannot be dismissed as useless.

It is far more important to have open sources for all programs that are executed in privileged mode than to have the source for the programs that are executed in user mode.

The kernel can control what a user-mode program does and limit its access to any hardware resources or CPU time, but it cannot do anything against kernel modules that are executed in privileged mode.

So having the source for all the kernel modules is the main priority. With this new open-source kernel module from NVIDIA, the only closed-source kernel module used by a large number of Linux users is no longer so.

Now the main problems remain the BIOS/UEFI of the computers, which is free to override what the operating system does, due to the exceedingly stupid System Management Mode invented by Intel, and the firmware for the auxiliary CPUs that may be used for unauthorized remote management in most Intel- and AMD-based computers.

Re:Nvidia releases open-source GPU kernel modules by danieldk on Thursday May 12, 2022 @08:31AM (#31353063)
Plus, I assume that this would make it possible for distributions to provide signed modules, making it much easier to use secure boot on systems with NVIDIA drivers (before you had to sign the drivers yourself after building them).
Re:Nvidia releases open-source GPU kernel modules by eek2121 on Wednesday May 11, 2022 @10:32PM (#31348607)
I came here to say that. This isn't an NVIDIA commitment to open source; it is a slap in the face. Rather than open sourcing the drivers, they are patching the kernel to fit the needs of their proprietary driver. Note that I'm not against proprietary software, however, title of this post was super misleading and NVIDIA needs to grow up and work on an open-source driver. The world will NOT change for them.
Re:Nvidia releases open-source GPU kernel modules by IshKebab on Thursday May 12, 2022 @06:03AM (#31351621)
The world doesn't need to change for them. They already have successful closed source drivers.

You're right that this isn't about nVidia suddenly deciding to open source anything, but it's still good for compatibility reasons.

Re:Nvidia releases open-source GPU kernel modules by kaladin-jasnah on Wednesday May 11, 2022 @11:15PM (#31348878)
Re:Nvidia releases open-source GPU kernel modules by lstamour on Thursday May 12, 2022 @02:10AM (#31349865)
It’s not actually a driver. Note comments like “Initialize driver-specific stuff” in the code.

Mesa refers to https://docs.mesa3d.org/systems.html and Vulkan refers to https://en.m.wikipedia.org/wiki/Vulkan

To quote the linked blog post:

> This blog post will be a tutorial of sorts (we won't have a functioning Vulkan driver in the end, sorry)

> First off, every driver needs a name. We're not actually writing one here but it'll make the examples easier if we pretend we are. Just for the sake of example, I'm going to pick on NVIDIA because... Why not? Such a driver is clearly missing and really should happen soon. (Hint! Hint!) We're going to call this hypothetical new Vulkan driver NVK.

That said… NVIDIA did release a Vulkan driver in January 2022 which supports Vulkan 1.3 so… this blog post is slightly outdated. But it certainly does not include or reference work on an actual NVIDIA driver.

Re:Nvidia releases open-source GPU kernel modules by ColonelPhantom on Sunday May 15, 2022 @11:13AM (#31388035)
The blog post is about writing a Vulkan driver inside Mesa. Nvidia's blob driver does not count here.
Re:Nvidia releases open-source GPU kernel modules by parasense on Thursday May 12, 2022 @12:49AM (#31349411)
That's a bit of a tired and somewhat misleading argument.

Take a look into the kernel-firmware repo, and you will see a tremendous amount of binary firmware blobs. For example the Intel micro-code blobs are protected by ~7 layers deep of encryption, wifi drivers may have government regulatory issues with sharing firmwares in anything but binary form. So let's please drop the evil binary blob nonesense...

The kernel does in fact accept small or large binary blobs, and some of them even come with source code...So I guess the key takeaway is to look at what separate the Nvidia driver/firmware from all those other binary firmware loading drivers.

Hint, it has more to do with hiding the program interface, and using abstractions within abstractions.

Re:Nvidia releases open-source GPU kernel modules by hda2 on Thursday May 12, 2022 @01:19AM (#31349567)
This small tirade of yours is arguing against a strawman.

GP is likely referring to the userspace component of nvidia's driver, not the actual blob that gets loaded onto the gpu. If it is indeed true that you need to run proprietary userland code, then this open-source release is nothing but a way to circumvent the GPL issues that lead to nvidia's driver partially breaking in Linux 5.??.

While not ideal, I like many don't have a hard stance against loading proprietary hardware firmware blobs. I, however, absolutely take issue with running opaque user-space programs.

Re:Nvidia releases open-source GPU kernel modules by adrian_b on Thursday May 12, 2022 @05:53AM (#31351548)
All closed-source kernel modules and a part of the firmware blobs (those that are for devices which have communication interfaces, especially wireless interfaces, and which may access directly the memory space without being blocked by a MMU under the control of the OS kernel) are major security risks, because they might be controlled by an attacker, with no means of detection by the user.

With a security-strengthened operating system, or with a VM/container/sandbox, it is possible to ensure that any opaque user-space program is no security risk.

I prefer very much open-source user-space programs for 2 reasons:

1. I am only seldom content with a program conceived by someone else, because usually I want to do something else than they had in mind and their program is suboptimal for my use case. When the program is open-source, that does not matter. I can modify it and combine it with other programs, to do whatever I like.

2. Whenever there are problems due to bugs, incomplete documentation or misconfigurations, if the program is open source any problem can be solved sooner or later, usually sooner. With proprietary programs, typically one gets only some incomprehensible error messages and it may happen that entire departments of IT professionals try for weeks to solve the problem, without any progress. (I had such a case last year; after upgrading an old company laptop with a new one, MS Teams stopped working; 4 or 5 IT support people distributed over 3 continents attempted to discover the cause over 2 weeks, but they all failed).

These 2 reasons make the open source programs much more desirable, but if you have to also use some opaque user-space programs for specific tasks, e.g. a Synopsys Verilog/VHDL synthesis program for designing with a FPGA, that is no big deal.

On the other hand, using an opaque kernel module which may contain either an intentional back-door or just an unintentional bug which may cause your computer to freeze exactly before saving some large piece of work, or which may corrupt you file buffers before being saved, this is much worse than the use of any opaque user-mode program.

Re:Nvidia releases open-source GPU kernel modules by dwaite on Thursday May 12, 2022 @10:30PM (#31362596)
> With a security-strengthened operating system, or with a VM/container/sandbox, it is possible to ensure that any opaque user-space program is no security risk.

This is absolutely not true.

It is possible to restrict an opaque user-space program to the minimal set of permissions it requires.

In this particular case, the program needs to manipulate system hardware in undocumented ways, via vendor code which is extending the kernel.

Re:Nvidia releases open-source GPU kernel modules by hoistbypetard on Thursday May 12, 2022 @07:21AM (#31352346)
> With a security-strengthened operating system, or with a VM/container/sandbox, it is possible to ensure that any opaque user-space program is no security risk.

In theory this may be true. But the particular opaque user-space program is talking to a driver authored by the same team. That driver is talking to hardware that has access to all of the memory in your computer.

The odds are high that a userspace program talking to this kind of driver could make your computer do something you don't want it to do in a way that is very difficult to suss out just by reviewing the driver source code.

(I agree that an open driver is a great improvement over a closed one. But I don't think you can make any strong guarantees about the safety of the closed userspace portions of this one, yet.)

Re:Nvidia releases open-source GPU kernel modules by RussianCow on Thursday May 12, 2022 @07:17PM (#31361249)
I'm not sure why you were downvoted; this is 100% correct. Open source makes adding backdoors much more difficult, but I imagine GPU driver code is so complex that there are likely security flaws that even the entire open source community wouldn't catch. Yes, an open source driver is an improvement in many ways, but it certainly doesn't solve these problems because the attack surface is so gigantic.
Re:Nvidia releases open-source GPU kernel modules by mjan22640 on Friday May 13, 2022 @06:34AM (#31365575)
> has access to all of the memory in your computer

You can use IOMMU to restrict the access to the appropriate memory sections.

Re:Nvidia releases open-source GPU kernel modules by hoistbypetard on Sunday May 15, 2022 @02:17PM (#31389639)
I don't think, for accelerating a desktop graphics card used across your entire desktop environment, IOMMU changes my argument at all.

I believe it *does* help if, say your desktop's integrated video works natively and you have a second card you want to pass through to a gaming VM. Or if you have a server with no card shared between users and a one-card-per-user scenario.

Re:Nvidia releases open-source GPU kernel modules by pjmlp on Thursday May 12, 2022 @01:37AM (#31349677)
Interesting, so they can do whatever they want, provided it runs as firmware.
Re:Nvidia releases open-source GPU kernel modules by mort96 on Thursday May 12, 2022 @04:04AM (#31350637)
My view is that nvidia's hardware can work however they want it to. FOSS firmware would be cool in the same way that FOSS hardware would be cool, but it's not something I expect. I also don't care that much whether the proprietary firmware is stored on on-board flash and programmed from the factory or if it's uploaded by my OS when the driver is loaded.

But I would prefer if the code I run in userspace or kernelspace is FOSS.

Re:Nvidia releases open-source GPU kernel modules by parasense on Monday May 16, 2022 @01:49PM (#31400993)
> I also don't care that much whether the proprietary firmware is stored on on-board flash and programmed from the factory or if it's uploaded by my OS when the driver is loaded.

Bingo!

Nobody cares about firmware, that's not the issue, never was... but somehow that became the narrative repeated by people who don't know what they are talking about.

Many firmware loading drivers have caused drama over the years. I'm not sure if anybody remembers when Pottering and Sievers re-worked udev to change the ordering of how firmware was loaded from user-space, trying to improve how computers booted, by graphing firmware loads, determining the loading ordering, etc... which sometimes need to happen before it's kernel driver loads, or sometimes the driver itself is able to load the firmware, or the driver begin lazy, expects udev to load the firmware after the kmod is loaded... As a result, the kernel loads firmwares itself.

I'd say the whole firmware thing needs to be put under review, with concrete rules how they are loaded, and what their interfaces has to look like, and what hardware abstraction rules actually apply.

Re:Nvidia releases open-source GPU kernel modules by chme on Thursday May 12, 2022 @02:46AM (#31350049)
I think this firmwareblob vs. kernelblob vs. userspace blob needs to be decided on a case by case basis, and no strict line that shall not be crossed can be drawn anywhere. The important factor is, does their contribution help the community or not, will it allow the community to fix bugs and port stuff to a new innovative kernel, without it needing to re-implement everything from Linux?

Personally I would try to decide on blob size and scope. With nvidias driver I suspect that require massive firmware and userspace blobs, and the kernel driver is probably just a pass-through API. I would argue that this doesn't really move the community forward.

However if the blobs are small and simple, and have specific scope and a reason, like legislation or security, maybe even calibration data blobs, are useful independent of the OS itself, then I would give them a pass, since it allows the community to build upon.

Re:Nvidia releases open-source GPU kernel modules by atoav on Thursday May 12, 2022 @02:49AM (#31350072)
Where do you draw the border? Even if they open source the firmware, they can also do whatever they want provided it runs as hardware.

If trust is the issue, you would have to open source the hardware/the silicon as well.

If trust isn't the issue, but being able to do your own things with the hardware you own, this is sth. different.

Re:Nvidia releases open-source GPU kernel modules by parasense on Friday May 13, 2022 @04:40PM (#31372325)
> this open-source release is nothing but a way to circumvent the GPL issues

Talking about strawman arguments... that's a doozie!

Instead of ignoring your strawman, staying focused on the topic...I'm going to address this nonesense...

Firstly Nvidia is not in violation of the GPL. Secondly, nobody cares about GPL violations, most certainly not the mainline kernel community. They do not pursue blatant GPL violations, because litigation is not productive in terms of improving the kernel, but keep in mind Nvidia is not violating the GPL. Thirdly, user space libraries that interface with a kernel API are not violating the GPL. Folks are allowed to run proprietary software on Linux. Do I like that, no... I certainly don't love it. However, Nvidia running user space graphics libraries is not much different than Radeon drivers using Mesa in userspace, it's how graphics architectures work in 2022.

So it's kidna ironic you're arguing about something separate (straw-man), and even then that argument fails...

Now then, putting your tangent aside... The whole point here is to start with the kernel, and get the kernel wrapper driver that interfaces with the hardware's firmware binary interface open sourced. The whole point is to get the driver into mainline, someday... Once we have that, we can untangle the the spaghetti of graphics API libraries, perhaps even port them to Mesa. Nvidia most certainly uses an intermediary low-level graphics representation for their graphics cards, so they can support all the various graphics APi's, or what not... it's a very common pattern for graphics cards... one Radeon even fell into not long ago. So it's just a matter of time before we decode this stuff.

But you're not wrong in terms of Nvidia's overall stack being proprietary, at least for now. But that's not important, what's important is Nvidia users wont' have so much drama when their distro kernel upgrades, and they screen goes blank thanks to Nvidia's driver not being compatible with the changed kernel ABI, and the AKMOD not being able to handle it.

Re:Nvidia releases open-source GPU kernel modules by Out_of_Characte on Thursday May 12, 2022 @01:20AM (#31349573)
No law or regulation that I know of specifies binary format.
Re:Nvidia releases open-source GPU kernel modules by ZiiS on Thursday May 12, 2022 @02:19AM (#31349913)
The regulations specify they should not be easily changed. Distributing source makes it easier to change.
Re:Nvidia releases open-source GPU kernel modules by dannymi on Thursday May 12, 2022 @05:30AM (#31351363)
The carl firmware at https://github.com/chunkeey/carl9170fw should put that argument to rest. That is Wifi firmware source code for the Wifi I currently use.

Easily changed likely means there's a physical knob somewhere that you could accidentially poke as a layperson.

Not that you get a three year CS education, figure out how your distribution packages dependencies, install the correct embedded toolchain (good luck), find out exactly which chip is in your device, fetch the proper firmware source code in the right version, build the thing, figure out how to flash the result onto the chip / read the Linux kernel sources to figure out the filename inside /lib/firmware. That's not easy.

Even if this entire process was packaged (it is--see <https://packages.debian.org/sid/firmware-linux-free>), it probably still doesn't count (or at least shouldn't count) as "easily" changed.

Re:Nvidia releases open-source GPU kernel modules by anthk on Thursday May 12, 2022 @02:19PM (#31358069)
Also, ath9k as a company.

More libre fw:

https://jxself.org/git/?p=linux-libre-firmware.git;a=tree

People stop talking out of his ass.

Re:Nvidia releases open-source GPU kernel modules by pabs3 on Thursday May 12, 2022 @09:17PM (#31362122)
Please note that the Debian firmware-linux-free package does not build carl9170fw from source. There is proper packaging (source package called carl9170fw, binary package will be firmware-carl9170) being worked on but it isn't completed yet:

https://bugs.debian.org/994625

Re:Nvidia releases open-source GPU kernel modules by notpushkin on Thursday May 12, 2022 @03:51AM (#31350558)
Unless you provide source code that builds reproducibly, and a detached signature that your hardware checks.
Re:Nvidia releases open-source GPU kernel modules by anthk on Thursday May 12, 2022 @02:21PM (#31358106)
Re:Nvidia releases open-source GPU kernel modules by privacyking on Thursday May 12, 2022 @04:56AM (#31351056)
Wasn't that law only introduced a few years ago?
Re:Nvidia releases open-source GPU kernel modules by greggsy on Wednesday May 11, 2022 @10:18PM (#31348499)
Has any rationale been provided around the blob being closed?

Is it licensed, or simply too too complicated to pick apart?

Graphics is a complicated field, but the techniques could still be patented - surely their market status isn’t dependent on trade secrets?

Re:Nvidia releases open-source GPU kernel modules by shmerl on Wednesday May 11, 2022 @10:25PM (#31348554)
My guess - tangled code mess without clear control over ownership and bean counters not approving the work of untangling all that to open things up - it's not an easy process for huge legacy codebase.
Re:Nvidia releases open-source GPU kernel modules by nimish on Thursday May 12, 2022 @01:30AM (#31349624)
It's pretty common to license peripheral bits of an ASIC from other companies. You don't even get to look at their blobs or much else.
Re:Nvidia releases open-source GPU kernel modules by prash_ant on Wednesday May 11, 2022 @10:34PM (#31348615)
There have been reports earlier [1] that processing power of some GPUs is suppressed by software rather than the hardware capability itself. It is frequently easier to mass produce similar chips than to have different chips for different priced devices. I had come across comments in other online forums where the users alleged that some software flags restrict the capability. I hope someone else will link those webpages if they come across them

[1] https://www.tomshardware.com/news/nvidia-gpu-system-processo...

Re:Nvidia releases open-source GPU kernel modules by azeirah on Friday May 13, 2022 @06:07AM (#31365372)
I suppose this is also used for yield quality?

For instance, AMD is known to sell the same actually-8-core chip as a 6-core if the transistor yield was poorer.

I believe this is a standard in the industry, right? You can theoretically unlock these cores yourself, but there's a decent chance it will break or cause other significant problems.

Re:Nvidia releases open-source GPU kernel modules by imtringued on Thursday May 12, 2022 @08:16AM (#31352872)
They can move those restrictions into firmware otherwise someone is going to develop a tool that unlocks the driver like people did for the Intel compiler.
Re:Nvidia releases open-source GPU kernel modules by hyperionplays on Wednesday May 11, 2022 @10:51PM (#31348745)
this was the case with RTX voice, a simple regedit made it work on non-RTX cards fine.
Re:Nvidia releases open-source GPU kernel modules by cvuls on Thursday May 12, 2022 @12:17AM (#31349221)
From my understanding, it used CPU acceleration instead
Re:Nvidia releases open-source GPU kernel modules by IntelMiner on Friday May 13, 2022 @02:14AM (#31363966)
It would use RT cores by default, but if they weren't available or in use (EG: running a game with Ray Tracing) it could fall back to the older CUDA

That's also why they split it out into two products now

"Nvidia Broadcast" is their "you bought an RTX GPU so here's a shiny toy"

And "RTX Voice" for people with GPU's dating back to the Geforce 400 series that only does it via CUDA

Re:Nvidia releases open-source GPU kernel modules by native_samples on Thursday May 12, 2022 @03:59AM (#31350605)
Yes. Drivers represent enormous amounts of work and large parts of the overall development/IP effort in a GPU. Asking why nVidia don't open source it is like asking why they don't just open source the entire GPU. Answer: because then they'd have a much smaller and less valuable business, if they even had a business at all.
Re:Nvidia releases open-source GPU kernel modules by account42 on Thursday May 12, 2022 @06:12AM (#31351703)
> because then they'd have a much smaller and less valuable business, if they even had a business at all.

This does not follow. While GPU drivers are a huge development effort, they are also very specific to the hardware. This is even more true with modern APIs that are closer to how the hardware works.

AMD and Intel both have open source GPU drivers and they are still in business. Are you claiming that their business would be much bigger if not for those open source drivers?

Re:Nvidia releases open-source GPU kernel modules by Qwertious on Thursday May 12, 2022 @10:34AM (#31354808)
>AMD and Intel both have open source GPU drivers and they are still in business. Are you claiming that their business would be much bigger if not for those open source drivers?

AMD and Intel are underdogs, and benefit from open standards. Nvidia has an outright majority, and as a result their incompatible "standards" benefit them, because it forces everyone to choose between supporting Nvidia (and therefore the majority of their userbase), or "open standards" (a minority).

Re:Nvidia releases open-source GPU kernel modules by native_samples on Friday May 13, 2022 @03:46AM (#31364548)
Apparently nVidia believe that is the case, and they are the market leaders, so - yes?
Re:Nvidia releases open-source GPU kernel modules by shmerl on Wednesday May 11, 2022 @10:22PM (#31348537)
I expect once Nouveau will have reclocking ironed out, there will be an effort to implement Vulkan on top of it in Mesa. OpenGL is already available.

That will allow avoiding Nvidia blob except for the firmware.

Re:Nvidia releases open-source GPU kernel modules by gpderetta on Thursday May 12, 2022 @06:04AM (#31351625)
It is not, but I think it removes a giant blocker for a truly OSS driver with Mesa/nouveau.
Re:Nvidia releases open-source GPU kernel modules by erung88 on Saturday May 14, 2022 @12:41AM (#31375141)
It takes time for Nvidia to become open-source friendly. Still a good move.

Hopefully the GPU driver is next in their open-source roadmap.

Re:Nvidia releases open-source GPU kernel modules by PaulHoule on Thursday May 12, 2022 @11:00AM (#31355216)
... and like any new software from NVIDIA it only supports the most recent generation of cards.

In normal times that might be a fair way to get people to upgrade but in the last few years (when crypto bros and scalpers have gotten all the cards) it's been outright cruel.

Re:Nvidia releases open-source GPU kernel modules by TomVDB on Thursday May 12, 2022 @11:41AM (#31355774)
Turing is not the most recent generation of cards.

But that aside, Turing is their first generation that a GPU System Processor (GSP) that runs the heavy binary blob that comes with the open source driver.

Re:Nvidia releases open-source GPU kernel modules by smcl on Wednesday May 11, 2022 @07:04PM (#31347105)
> This is not upstreamable in its current form (nvidia admit this in their press release)

True, I remember though that the semi-recent AMD Radeon drop was not immediately merge-able to mainline because they used a bespoke hardware abstraction layer. But (as alluded to by your point #1) it's a huge first step, and in AMD's case I think they eventually reworked it so that it could indeed be merged.

Re:Nvidia releases open-source GPU kernel modules by robocat on Wednesday May 11, 2022 @10:39PM (#31348662)
This is the key paragraph in the article relevant to your point:

  This open-source kernel code is currently split into OS-agnostic and kernel interface layer components. This stems from NVIDIA's proprietary driver on Linux largely being shared code across Windows / Linux / FreeBSD / Solaris. For it to be upstreamed in the Linux kernel it would likely need to be more re-factored to cater to Linux, just as AMD's DAL/DC originally had tough time upstreaming due to its numerous abstractions.
Re:Nvidia releases open-source GPU kernel modules by boberoni on Wednesday May 11, 2022 @07:27PM (#31347316)
> This is not upstreamable in its current form

What does "upstreamable" mean in this context? Is this good or bad?

As a follow-up, what would need to be different so that it is upstreamable and would that be good or bad?

Re:Nvidia releases open-source GPU kernel modules by Tuna-Fish on Wednesday May 11, 2022 @07:49PM (#31347503)
> What does "upstreamable" mean in this context? Is this good or bad?

"Upstream" is the kernel source tree maintained by Linus (and friends). As Linux is open source, anyone can fork it for any reason, and a lot of people do. However, Linus still maintains the common base that people use to build on top of. "Upstreaming" is the process of getting your code included in these official releases. It's significant because there are no stable interfaces inside the kernel. That is, in any release the Linux developers can change any internal system of the kernel in any way they please, with the only caveat that to get that change included they have to fix up any breakage it causes, but only inside upstream. Or, if you are building your own kernels with your own patch sets, any release of the kernel can completely break your build.

Because of this, if you want your code to be actually used by real people, upstreaming it is considered extremely good, to the point of being almost a necessity. However, it can be a significant hurdle to overcome. Partly because there are fairly strict code quality/style requirements (as any kernel dev is supposed to be able to jump into your code to fix issues they caused by modifications elsewhere), but mostly because unlike inside the kernel itself, all interfaces between kernel and userspace are stable. That is, if you start supporting some operation from userspace, you need to be able to support it in perpetuity. Also, the kernel devs are extremely reluctant to add any kind of interface to the kernel where the only thing that uses it is some specific non-free binary blob on the userspace side.

Currently the main reason the code is not upstreamable as is is that it needs a very substantial userspace program to function, which currently only exists as nonfree, and nVidia doesn't think that the interface used to connect to it is well-enough decided they want to freeze it.

So the main hurdle for upstreaming is developing that interface until they are happy with it, and then develop some free version of the userspace portion of their graphics stack that can plug into that same interface.

Re:Nvidia releases open-source GPU kernel modules by taftster on Wednesday May 11, 2022 @09:38PM (#31348193)
Excellent answer, thank you. I appreciate both the overall general answer and the detail specifically involving the nvidia driver itself.
Re:Nvidia releases open-source GPU kernel modules by MuffinFlavored on Wednesday May 11, 2022 @08:30PM (#31347774)
> upstreaming it is considered extremely good

are we assuming some sort of automatic testing will be added? unit testing? integration testing? sounds super hard to do for a driver. but... high quality code just being merged into master can still have bugs introduced in the future on accident, right? it's tests that usually makes it safe?

Re:Nvidia releases open-source GPU kernel modules by rsaxvc on Wednesday May 11, 2022 @08:36PM (#31347811)
You can run these sorts of tests in a VM with PCIe passthrough.
Re:Nvidia releases open-source GPU kernel modules by djbusby on Wednesday May 11, 2022 @09:28PM (#31348121)
And hardware companies usually have large test-beds of hardware. So, Nvidia should be able to build a comprehensive test-suite.
Re:Nvidia releases open-source GPU kernel modules by MuffinFlavored on Wednesday May 11, 2022 @09:45PM (#31348245)
the same way they should have been able to build an upstreamable opensource driver all this time, right? lol
Re:Nvidia releases open-source GPU kernel modules by djbusby on Wednesday May 11, 2022 @11:48PM (#31349056)
No. Cause one (hardware) is old-hat and the other (FOSS) is big and risky and scary.
Re:Nvidia releases open-source GPU kernel modules by jsjohnst on Thursday May 12, 2022 @08:25AM (#31352986)
The reason upstreaming it is considered extremely good really doesn’t have to do with unit testing or really exactly with testing at all. The issue, as stated eloquently by the parent of your post, is that without it being upstreamed, it’s Nvidia’s problem to fix any issues caused by one of their dependencies in the kernel changing, where as if it’s upstreamed, it’s only maybe partially their responsibility (main burden is on whoever changed the dependency).
Re:Nvidia releases open-source GPU kernel modules by loganberries on Thursday May 12, 2022 @04:42AM (#31350935)
The kernel has bugs, all software has bugs.

But there are massive massive test suites run by hundreds of companies on linux-next. If you email off a stack of patches that breaks something, chances are you'll get emails back telling you which patch had the breaking change in.

Re:Nvidia releases open-source GPU kernel modules by nwallin on Wednesday May 11, 2022 @08:53PM (#31347927)
'Upstreamable' means that they send Linus a pull request, and Linus merges it into the kernel. It would then become part of Linux.

It's a negative that it's not upstreamable. I wouldn't go so far as to say it's bad, but it's less than good. That means you'll continue to maintain a separate kernel module that's rebuilt for each kernel.

It would need to be modified to match the kernel's coding standards and whatnot. Part of what makes linux such a strong thing is that you're just not allowed to do certain things in the kernel. They won't include ZFS in the kernel because it's got its own entire vfs -- linux filesystems are only permitted to use linux's vfs, and if you need vfs changes to make it work, you modify the 'one true' vfs. They didn't include the original AMD Radeon driver because it had its own hardware abstraction layer; you're supposed to do that in user space or not at all. (the Radeon driver was changed to remove the abstraction layer, and it was later merged into the kernel)

It's not immediately clear to me how much work it will take to get the driver into the kernel. Hopefully it won't be a lot of work, but it's possible that it would require basically rewriting it from scratch. It's at least written almost entirely in C, so that's a good start.

Regardless, this is tremendously good news.

Re:Nvidia releases open-source GPU kernel modules by loganberries on Thursday May 12, 2022 @04:49AM (#31350988)
> send Linus a pull request

Linux doesn't do pull requests. You actually send your patches as an email to a kernel maintainer (different people accept patches for different parts of the codebase) and then they'll review it. They'll pass it up to someone above them, and they'll pass it to someone above them, and eventually it makes its way to Linus.

That's why Linus is famous for angry and aggressive emails. He's not shouting down new developers who have made a simple mistake. He shouts and swears at the people employed below him who failed to properly do quality control and code review.

Re:Nvidia releases open-source GPU kernel modules by prox on Thursday May 12, 2022 @02:27AM (#31349964)
What would the practical effect be for me as a user, say I render in Blender, or I play a few intensive 3d games?
Re:Nvidia releases open-source GPU kernel modules by loganberries on Thursday May 12, 2022 @04:45AM (#31350956)
Currently, you rely on Nvidia to keep the drivers up to date and working with the kernel you use in your OS.

If the drivers aren't upstream, a future kernel can break them. So if you update your OS, it might no longer support your GPU without installing an alternative. Nvidia are responsible for getting this fixed in a timely manner.

If the drivers are upstream, then people aren't allowed to break them when they make changes to the kernel. There should never be a kernel or OS upgrade that causes the drivers to no longer work, the people who made the breaking change are responsible for fixing it before it gets released to you.

Re:Nvidia releases open-source GPU kernel modules by prox on Thursday May 12, 2022 @05:50AM (#31351526)
Thanks, so it means a better out of the box stability for end users.
Re:Nvidia releases open-source GPU kernel modules by worthless-trash on Friday May 13, 2022 @02:13AM (#31363954)
And when you update your kernel, you wont need to recompile the kernel modules every time.
Re:Nvidia releases open-source GPU kernel modules by humanwhosits on Wednesday May 11, 2022 @07:30PM (#31347331)
You want things to be 'upstreamable' as they can be included in the default upstream kernel. If it gets included in Linus' git tree then keeping it working on future version of the kernel is much less hassle
Re:Nvidia releases open-source GPU kernel modules by Veliladon on Wednesday May 11, 2022 @07:31PM (#31347348)
Upstreamable means adding it to the official Linux source being distributed on linux.org.

It just means you have to download drivers separately until Nvidia give the kernel guys a pull request for the drivers to be included in the kernel sources by default.

Re:Nvidia releases open-source GPU kernel modules by eru on Wednesday May 11, 2022 @07:37PM (#31347408)
I think the more important thing than the separate download is that when someone works on the kernel, they usually make sure that the don't break other things that are in the official kernel. But there's no obligation not to break things outside the official kernel (apart from the interface to userland).
Re:Nvidia releases open-source GPU kernel modules by olliej on Thursday May 12, 2022 @02:32PM (#31358267)
(1) No, it's unambiguously "meh" news

Nvidia have merely moved their giant closed source drivers into "firmware" - they now have a 34Mb firmware image for the GPU, that would be more correctly called the real drivers. They have essentially created an open source GPL forwarding layer so that the non-GPL firmware gets access to GPL-only kernel APIs, that's it.

Re:Nvidia releases open-source GPU kernel modules by themusicgod1 on Wednesday May 11, 2022 @11:13PM (#31348871)
New code on github is never good news.
Re:Nvidia releases open-source GPU kernel modules by justemre on Sunday May 15, 2022 @11:03AM (#31387973)
Why?
Re:Nvidia releases open-source GPU kernel modules by themusicgod1 on Monday May 16, 2022 @05:32PM (#31403389)
Because github is microsoft, the enemy of freedom and the greatest threat the free software movement has ever faced