* [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing
@ 2024-11-15 12:49 Werner Sembach
2024-11-15 12:49 ` [PATCH v2 1/2] module: Put known GPL offenders in an array Werner Sembach
2024-11-15 12:49 ` [PATCH v2 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
0 siblings, 2 replies; 3+ messages in thread
From: Werner Sembach @ 2024-11-15 12:49 UTC (permalink / raw)
To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
linux-modules, linux-kernel, linux, vv, cs
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] module: Put known GPL offenders in an array
2024-11-15 12:49 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
@ 2024-11-15 12:49 ` Werner Sembach
2024-11-15 12:49 ` [PATCH v2 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
1 sibling, 0 replies; 3+ messages in thread
From: Werner Sembach @ 2024-11-15 12:49 UTC (permalink / raw)
To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
linux-modules, linux-kernel, linux, vv, cs
Cc: Uwe Kleine-König, Werner Sembach
From: Uwe Kleine-König <ukleinek@kernel.org>
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.
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
kernel/module/main.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 49b9bca9de12f..905d7b60dd709 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -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);
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] module: Block some modules by TUXEDO from accessing GPL symbols
2024-11-15 12:49 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
2024-11-15 12:49 ` [PATCH v2 1/2] module: Put known GPL offenders in an array Werner Sembach
@ 2024-11-15 12:49 ` Werner Sembach
1 sibling, 0 replies; 3+ messages in thread
From: Werner Sembach @ 2024-11-15 12:49 UTC (permalink / raw)
To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
linux-modules, linux-kernel, linux, vv, cs
Cc: Uwe Kleine-König, Werner Sembach
From: Uwe Kleine-König <ukleinek@kernel.org>
TUXEDO has not yet relicend 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.
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
kernel/module/main.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 905d7b60dd709..3f391183aaf97 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -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",
};
/*
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-15 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 12:49 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
2024-11-15 12:49 ` [PATCH v2 1/2] module: Put known GPL offenders in an array Werner Sembach
2024-11-15 12:49 ` [PATCH v2 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®