Skip to contentSkip to conversation

module: Block some modules by TUXEDO from accessing

PATCH Superseded Werner Sembach 1 participant 3 messages Nov 15, 2024 Module support

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 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
v4: Actually commit the changes I made for v3

#1 lore raw

PATCH v4 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 v4 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 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
kernel/module/main.c +24 -0
index 905d7b60dd709..5df995ff0a9d3 100644
@@ -2029,6 +2029,30 @@ static const char *module_license_offenders[] = {
 
 	/* lve claims to be GPL but upstream won't provide source */
 	"lve",
+
+	/*
+	 * Tuxedo distributes some of their kernel modules under GPLv3, but
+	 * uses MODULE_LICENSE("GPL") calls.
+	 * See https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/merge_requests/21
+	 * and https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/commit/dd34594ab880ed477bb75725176c3fb9352a07eb
+	 */
+	"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