One of the great new features of Linux 6.14 is the NTSYNC driver being completed for better emulating the Microsoft Windows NT synchronization primitives so that software like Wine and Proton (Steam Play) can provide for better performance when running Windows games on Linux. But it turns out an oversight up to now has meant that in practice it’s not really too usable out-of-the-box.
A permissions issue has led to the NTSYNC driver not exposing its /dev/ntsync char device being read/write to users by default. In turn NTSYNC out-of-the-box isn’t immediately usable unless manually changing the NTSYNC device permissions or having a udev script or similar for making the modification so non-root users can read/write to interact with this software device.
A pull request to systemd for udev was posted to add the NTSYNC device group and permissions. But that was discounted as something better for the upstream kernel. Questions were raised over it being world writable and readable, which should be fine due to this not being a real hardware device and for each file descriptor opened on the device only objects created by that instance may be used with other objects from that same instance.
An NTSYNC kernel driver patch was posted to the Linux kernel mailing list to set the /dev/ntsync device permissions to 0666 by default so it will work for non-root processes by default.
To which Greg Kroah-Hartman immediately commented:
“Are you sure you need/want that? If so, why? How did existing testing not ever catch this?”
In turn Elizabeth Figura commented:
“Hi, sorry, this is of course my fault.
We do need /dev/ntsync to be openable from user space for it to be useful. I’m not sure what the most “correct” permissions are to have in this case (when we don’t specifically need read or write), but I don’t think I see a reason not to just set to 666 or 444.
I originally assumed that the right way to do this was not to set the mode on the kernel file but rather through udev; I believe I was using the code for /dev/loop-control or /dev/fuse as an example, which both do that. So I (and others who tested) had just manually set up udev rules for this, with the eventual intent of adding a default rule to systemd like the others. I only recently realized that doing something like this patch is possible and precedented.
I don’t know what the best way to address this is, but this is certainly the simplest.”
In turn Greg is now open to accepting a signed off patch making this default change to the NTSYNC driver. So if all goes well likely in the coming days we’ll see the NTSYNC driver adapted in Linux 6.14 Git for the more open read/write permissions by default so that it will be usable out-of-the-box for Linux gamers.