Licensing issues
I've been cross-checking licensing details, and we have some problems.
1) We install xen/include/public/COPYING into /usr/include/xen/COPYING, which is not common practice. The installed file is mostly useless because it discusses files based on their xen.git paths.
2) We actually use the MIT header for the public interface, but we don't actually call it by it's common name anywhere.
3) The following files are missing the MIT header:
/usr/include/xen/foreign/x86_32.h/usr/include/xen/foreign/x86_64.h/usr/include/xen/foreign/arm32.h/usr/include/xen/foreign/arm64.h/usr/include/xen/sys/gntalloc.h/usr/include/xen/device_tree_defs.h/usr/include/xen/errno.h
Foreign are autogenerated from headers with MIT licences, so that's an easy fix.
errno.h was an oversight when we added it. There's no problem fixing it, as it is covered by multiple statements elsewhere in the tree.
device_tree_defs.h is problematic. It came into existence in c/s 1c898a9fec7e4 when some LGPL code was moved out of libxl, and some GPL code was copied out of Xen. So there's currently an GPL+LGPL vs MIT licensing violation.
I have not looked through history, but it's likely that the copyright is covered by individuals/companies who are still active members of Xen, and I don't anticipate any problem getting it formally relicensed (it's just a few constants), but this does need fixing.
sys/gntalloc.h is more complicated. It's stated as public domain which is fine for our purposes, but inconsistent with everything else, and we need to adjust the various files we've got which state that the full public API is MIT.
But it does raise a different bug. Why do we have random linux headers committed in the tree, used by some userspace libraries?
Another error I found while poking around is io/libxenvchan.h. This is the interface for the dom->dom vchan shared header so ought to live in the Xen public headers, but it includes <sys/types.h> for no need, excluding its use in non-posix usecases. Also also ought to be fixed from having a zero length array to a flexible member.
4) I'm going to start putting together some fixes some of this. Henry:
Relicensing device_tree_defs.h is a release blocker.
I'm also intending to start using SDPX identifiers to save on all the boilerplate. They're already used elsewhere.
I'm tempted to put together a check which can run in CI to try and prevent mistakes like this slipping in again, but it's going to be of little use until it is used in pre-push testing.
~Andrew
Quoted 2 lines · Andrew Cooper
I'm also intending to start using SDPX identifiers to save on all the boilerplate. They're already used elsewhere.
I just wanted to add that adding/using SPDX is important and came up quite a few times in Linux Foundation discussions recently [1]. Linux and Zephyr already support it. As a community, I think we should move toward it reasonably quickly.
Quoted 35 lines · Andrew Cooper
I've been cross-checking licensing details, and we have some problems.
1) We install xen/include/public/COPYING into
/usr/include/xen/COPYING, which is not common practice. The installed file is mostly useless because it discusses files based on their xen.git paths.2) We actually use the MIT header for the public interface, but we don't actually call it by it's common name anywhere.
3) The following files are missing the MIT header:
/usr/include/xen/foreign/x86_32.h/usr/include/xen/foreign/x86_64.h/usr/include/xen/foreign/arm32.h/usr/include/xen/foreign/arm64.h/usr/include/xen/sys/gntalloc.h/usr/include/xen/device_tree_defs.h/usr/include/xen/errno.hForeign are autogenerated from headers with MIT licences, so that's an easy fix.
errno.hwas an oversight when we added it. There's no problem fixing it, as it is covered by multiple statements elsewhere in the tree.
device_tree_defs.his problematic. It came into existence in c/s1c898a9fec7e4when some LGPL code was moved out of libxl, and some GPL code was copied out of Xen. So there's currently an GPL+LGPL vs MIT licensing violation.I have not looked through history, but it's likely that the copyright is covered by individuals/companies who are still active members of Xen, and I don't anticipate any problem getting it formally relicensed (it's just a few constants), but this does need fixing.
Quoted 7 lines
sys/gntalloc.his more complicated. It's stated as public domain which is fine for our purposes, but inconsistent with everything else, and we need to adjust the various files we've got which state that the full public API is MIT.But it does raise a different bug. Why do we have random linux headers committed in the tree, used by some userspace libraries?
I would guess this is because in the past (pre Linux pvops kernels) we wanted distros to be able to build Xen packages on boxes that did not run Xen patched kernels, and hence didn't have the user-space headers, that's why we had to add them to xen.git.
I added the FreeBSD ones myself, but I did wonder whether it was required or not. I will see about removing the FreeBSD ones and using the ones in the system.
Regards, Roger.
Quoted 41 lines · Roger Pau Monné
Quoted 40 lines · Andrew Cooper
I've been cross-checking licensing details, and we have some problems.
1) We install xen/include/public/COPYING into
/usr/include/xen/COPYING, which is not common practice. The installed file is mostly useless because it discusses files based on their xen.git paths.2) We actually use the MIT header for the public interface, but we don't actually call it by it's common name anywhere.
3) The following files are missing the MIT header:
/usr/include/xen/foreign/x86_32.h/usr/include/xen/foreign/x86_64.h/usr/include/xen/foreign/arm32.h/usr/include/xen/foreign/arm64.h/usr/include/xen/sys/gntalloc.h/usr/include/xen/device_tree_defs.h/usr/include/xen/errno.hForeign are autogenerated from headers with MIT licences, so that's an easy fix.
errno.hwas an oversight when we added it. There's no problem fixing it, as it is covered by multiple statements elsewhere in the tree.
device_tree_defs.his problematic. It came into existence in c/s1c898a9fec7e4when some LGPL code was moved out of libxl, and some GPL code was copied out of Xen. So there's currently an GPL+LGPL vs MIT licensing violation.I have not looked through history, but it's likely that the copyright is covered by individuals/companies who are still active members of Xen, and I don't anticipate any problem getting it formally relicensed (it's just a few constants), but this does need fixing.
sys/gntalloc.his more complicated. It's stated as public domain which is fine for our purposes, but inconsistent with everything else, and we need to adjust the various files we've got which state that the full public API is MIT.
Quoted 7 lines
Quoted 2 lines
But it does raise a different bug. Why do we have random linux headers committed in the tree, used by some userspace libraries?
I would guess this is because in the past (pre Linux pvops kernels) we wanted distros to be able to build Xen packages on boxes that did not run Xen patched kernels, and hence didn't have the user-space headers, that's why we had to add them to xen.git.
It isn't so easy.
Those are headers of Xen-specific kernel drivers.
Especially in case new features are added to the upstream kernel drivers, we want to be able to build the Xen tools using them without requiring a bleeding edge kernel installed.
This whole scheme requires to not remove any features from the headers, of course, similar to the handling of our public Xen headers.
Juergen
Quoted 50 lines · Juergen Gross
Quoted 41 lines · Roger Pau Monné
Quoted 40 lines · Andrew Cooper
I've been cross-checking licensing details, and we have some problems.
1) We install xen/include/public/COPYING into
/usr/include/xen/COPYING, which is not common practice. The installed file is mostly useless because it discusses files based on their xen.git paths.2) We actually use the MIT header for the public interface, but we don't actually call it by it's common name anywhere.
3) The following files are missing the MIT header:
/usr/include/xen/foreign/x86_32.h/usr/include/xen/foreign/x86_64.h/usr/include/xen/foreign/arm32.h/usr/include/xen/foreign/arm64.h/usr/include/xen/sys/gntalloc.h/usr/include/xen/device_tree_defs.h/usr/include/xen/errno.hForeign are autogenerated from headers with MIT licences, so that's an easy fix.
errno.hwas an oversight when we added it. There's no problem fixing it, as it is covered by multiple statements elsewhere in the tree.
device_tree_defs.his problematic. It came into existence in c/s1c898a9fec7e4when some LGPL code was moved out of libxl, and some GPL code was copied out of Xen. So there's currently an GPL+LGPL vs MIT licensing violation.I have not looked through history, but it's likely that the copyright is covered by individuals/companies who are still active members of Xen, and I don't anticipate any problem getting it formally relicensed (it's just a few constants), but this does need fixing.
sys/gntalloc.his more complicated. It's stated as public domain which is fine for our purposes, but inconsistent with everything else, and we need to adjust the various files we've got which state that the full public API is MIT.Quoted 7 lines
Quoted 2 lines
But it does raise a different bug. Why do we have random linux headers committed in the tree, used by some userspace libraries?
I would guess this is because in the past (pre Linux pvops kernels) we wanted distros to be able to build Xen packages on boxes that did not run Xen patched kernels, and hence didn't have the user-space headers, that's why we had to add them to xen.git.
Quoted 7 lines
It isn't so easy.
Those are headers of Xen-specific kernel drivers.
Especially in case new features are added to the upstream kernel drivers, we want to be able to build the Xen tools using them without requiring a bleeding edge kernel installed.
We could #ifdef code based on what's defined in the headers.
But that would have the side effect of limiting the builtin features to the support present in the kernel used for the build process, which can be an issue for Linux distros I guess.
For FreeBSD that wouldn't be so bad because the kernel is packaged together with userspace.
Roger.