Skip to contentSkip to conversation

module: Block some modules by TUXEDO from accessing

PATCH Superseded Werner Sembach 2 participants 6 messages Nov 15, 2024 Module support

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover module: Block some modules by TUXEDO from accessing

Following the meeting I wrote about yesterday, I now changed the license of what we could change spontaniously to prove good faith.

I still hope that the rest can be sorted out before anything gets merged. We are working on it. A clear time window would still be helpfull.

At Uwe. I don't know how it works if you modifiy someone elses code. I removed the Signed-off-by: line and I guess you have to add it again?

v2: Removed modules that could and have been spontaniously relicensed
v3: Fix typo and remove untrue assumption while giving more context

#1 lore raw

PATCH v3 1/2 module: Put known GPL offenders in an array

From: Uwe Kleine-König <[email protected]>

Instead of repeating the add_taint_module() call for each offender, create an array and loop over that one. This simplifies adding new entries considerably.

---
 kernel/module/main.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
kernel/module/main.c +14 -9
index 49b9bca9de12f..905d7b60dd709 100644
@@ -2023,11 +2023,20 @@ static int rewrite_section_headers(struct load_info *info, int flags)
 	return 0;
 }
 
+static const char *module_license_offenders[] = {
+	/* driverloader was caught wrongly pretending to be under GPL */
+	"driverloader",
+
+	/* lve claims to be GPL but upstream won't provide source */
+	"lve",
+};
+
 /*
  * These calls taint the kernel depending certain module circumstances */
 static void module_augment_kernel_taints(struct module *mod, struct load_info *info)
 {
 	int prev_taint = test_taint(TAINT_PROPRIETARY_MODULE);
+	size_t i;
 
 	if (!get_modinfo(info, "intree")) {
 		if (!test_taint(TAINT_OOT_MODULE))
@@ -2076,15 +2085,11 @@ static void module_augment_kernel_taints(struct module *mod, struct load_info *i
 	if (strcmp(mod->name, "ndiswrapper") == 0)
 		add_taint(TAINT_PROPRIETARY_MODULE, LOCKDEP_NOW_UNRELIABLE);
 
-	/* driverloader was caught wrongly pretending to be under GPL */
-	if (strcmp(mod->name, "driverloader") == 0)
-		add_taint_module(mod, TAINT_PROPRIETARY_MODULE,
-				 LOCKDEP_NOW_UNRELIABLE);
-
-	/* lve claims to be GPL but upstream won't provide source */
-	if (strcmp(mod->name, "lve") == 0)
-		add_taint_module(mod, TAINT_PROPRIETARY_MODULE,
-				 LOCKDEP_NOW_UNRELIABLE);
+	for (i = 0; i < ARRAY_SIZE(module_license_offenders); ++i) {
+		if (strcmp(mod->name, module_license_offenders[i]) == 0)
+			add_taint_module(mod, TAINT_PROPRIETARY_MODULE,
+					 LOCKDEP_NOW_UNRELIABLE);
+	}
 
 	if (!prev_taint && test_taint(TAINT_PROPRIETARY_MODULE))
 		pr_warn("%s: module license taints kernel.\n", mod->name);
Signature · 1 line
2.43.0
#2 lore raw

PATCH v3 2/2 module: Block some modules by TUXEDO from accessing GPL symbols

In reply to Werner Sembach

From: Uwe Kleine-König <[email protected]>

TUXEDO has not yet relicensed all modules for GPLv2+ as former contributer need to be contacted that comited code under GPLv3+.

So teach the module loader that these modules are proprietary despite their declaration to be GPLv2 compatible until the relicensing is complete.

---
 kernel/module/main.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
kernel/module/main.c +23 -0
index 905d7b60dd709..3f391183aaf97 100644
@@ -2029,6 +2029,29 @@ static const char *module_license_offenders[] = {
 
 	/* lve claims to be GPL but upstream won't provide source */
 	"lve",
+
+	/*
+	 * Tuxedo distributes their kernel modules under GPLv3, but intentially
+	 * lies in their MODULE_LICENSE() calls.
+	 * See https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/commit/a8c09b6c2ce6393fe39d8652d133af9f06cfb427
+	 */
+	"tuxedo_io",
+	"tuxedo_nb04_keyboard",
+	"tuxedo_nb04_wmi_ab",
+	"tuxedo_nb04_wmi_bs",
+	"tuxedo_nb04_sensors",
+	"tuxedo_nb04_power_profiles",
+	"tuxedo_nb04_kbd_backlight",
+	"tuxedo_nb05_keyboard",
+	"tuxedo_nb05_kbd_backlight",
+	"tuxedo_nb05_power_profiles",
+	"tuxedo_nb05_ec",
+	"tuxedo_nb05_sensors",
+	"tuxedo_nb05_fan_control",
+	"clevo_wmi",
+	"tuxedo_keyboard",
+	"clevo_acpi",
+	"uniwill_wmi",
 };
 
 /*
Signature · 1 line
2.43.0
#3 lore raw
In reply to Werner Sembach

Am 15.11.24 um 13:58 schrieb Werner Sembach:

Quoted 12 lines

Following the meeting I wrote about yesterday, I now changed the license of what we could change spontaniously to prove good faith.

I still hope that the rest can be sorted out before anything gets merged. We are working on it. A clear time window would still be helpfull.

At Uwe. I don't know how it works if you modifiy someone elses code. I removed the Signed-off-by: line and I guess you have to add it again?

v2: Removed modules that could and have been spontaniously relicensed
v3: Fix typo and remove untrue assumption while giving more context

Wrong version in the cover letter, but should be no problem should it?

I need to grab lunch ...

#4 lore raw

Hello Werner,

Quoted 9 lines · Werner Sembach

Am 15.11.24 um 13:58 schrieb Werner Sembach:

Quoted 8 lines

Following the meeting I wrote about yesterday, I now changed the license of what we could change spontaniously to prove good faith.

I still hope that the rest can be sorted out before anything gets merged. We are working on it. A clear time window would still be helpfull.

At Uwe. I don't know how it works if you modifiy someone elses code. I removed the Signed-off-by: line and I guess you have to add it again?

The more usual thing would have been to reply to my mail saying something like:

All the code in tuxedo-drivers.git that Tuxedo owns the complete copyright for was relicensed to GPLv2+ now. (See $link) For the remaining code I'm working in the background towards relicensing.

So please drop

$modulelist

from your patch of modules to block.

I'm sure with that feedback you don't risk that the original patch is applied.

If you take someone else's patch and rework it (which IMHO should only be done when the original submitter dropped following up to prevent duplication of work), it's good style to explicitly mention the changes you implemented since the patch was initially posted. And then don't remove the S-o-b line. See 7602ffd1d5e8927fadd5187cb4aed2fdc9c47143 for an example. I think this is (at least partly) also described in Documentation/ somewhere.

Looking at
https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/commit/dd34594ab880ed477bb75725176c3fb9352a07eb
(which would be $link mentioned above): If you switch to GPLv2, using the SPDX-License-Identifier should be good enough (but INAL). For sure don't put "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" in your files,
https://www.fsf.org/blogs/community/fsf-office-closing-party. Just keep

You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>.

which is also the current suggestion by the FSF,
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.

Thanks for working on this!
Uwe

#5 lore raw

Hello,

Am 15.11.24 um 17:40 schrieb Uwe Kleine-König:

Quoted 20 lines

Hello Werner,

Quoted 9 lines · Werner Sembach

Am 15.11.24 um 13:58 schrieb Werner Sembach:

Quoted 8 lines

Following the meeting I wrote about yesterday, I now changed the license of what we could change spontaniously to prove good faith.

I still hope that the rest can be sorted out before anything gets merged. We are working on it. A clear time window would still be helpfull.

At Uwe. I don't know how it works if you modifiy someone elses code. I removed the Signed-off-by: line and I guess you have to add it again?

The more usual thing would have been to reply to my mail saying something like:

All the code in tuxedo-drivers.git that Tuxedo owns the complete copyright for was relicensed to GPLv2+ now. (See $link) For the remaining code I'm working in the background towards relicensing.

Quoted 8 lines

So please drop

$modulelist

from your patch of modules to block.

I'm sure with that feedback you don't risk that the original patch is applied.

After the prevailing discussion, I'm not so sure about this. I went with the safe option of sending code, because code usually gets more attention on the LKML in my experience.

Quoted 8 lines

If you take someone else's patch and rework it (which IMHO should only be done when the original submitter dropped following up to prevent duplication of work), it's good style to explicitly mention the changes you implemented since the patch was initially posted. And then don't remove the S-o-b line. See 7602ffd1d5e8927fadd5187cb4aed2fdc9c47143 for an example. I think this is (at least partly) also described in Documentation/ somewhere.

Thanks for the reference, I will come back to it when I need it in the future.

Quoted 9 lines

Looking at
https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/commit/dd34594ab880ed477bb75725176c3fb9352a07eb
(which would be $link mentioned above): If you switch to GPLv2, using the SPDX-License-Identifier should be good enough (but INAL). For sure don't put "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" in your files,
https://www.fsf.org/blogs/community/fsf-office-closing-party. Just keep

Quoted 8 lines

You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>.

which is also the current suggestion by the FSF,
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.

Thanks for working on this!
Uwe

TBH I would be more happy with an apology for being called a liar, as I was already working on it starting Monday.

Best regards,

Werner Sembach