mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing
@ 2024-11-15 12:58 Werner Sembach
  2024-11-15 12:58 ` [PATCH v3 1/2] module: Put known GPL offenders in an array Werner Sembach
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Werner Sembach @ 2024-11-15 12:58 UTC (permalink / raw)
  To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
	linux-modules, linux-kernel, linux, vv, cs, wse

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/2] module: Put known GPL offenders in an array
  2024-11-15 12:58 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
@ 2024-11-15 12:58 ` Werner Sembach
  2024-11-15 12:58 ` [PATCH v3 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
  2024-11-15 13:03 ` [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
  2 siblings, 0 replies; 6+ messages in thread
From: Werner Sembach @ 2024-11-15 12:58 UTC (permalink / raw)
  To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
	linux-modules, linux-kernel, linux, vv, cs, wse
  Cc: Uwe Kleine-König

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] 6+ messages in thread

* [PATCH v3 2/2] module: Block some modules by TUXEDO from accessing GPL symbols
  2024-11-15 12:58 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
  2024-11-15 12:58 ` [PATCH v3 1/2] module: Put known GPL offenders in an array Werner Sembach
@ 2024-11-15 12:58 ` Werner Sembach
  2024-11-15 13:03 ` [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
  2 siblings, 0 replies; 6+ messages in thread
From: Werner Sembach @ 2024-11-15 12:58 UTC (permalink / raw)
  To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
	linux-modules, linux-kernel, linux, vv, cs, wse
  Cc: Uwe Kleine-König

From: Uwe Kleine-König <ukleinek@kernel.org>

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.

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] 6+ messages in thread

* Re: [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing
  2024-11-15 12:58 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
  2024-11-15 12:58 ` [PATCH v3 1/2] module: Put known GPL offenders in an array Werner Sembach
  2024-11-15 12:58 ` [PATCH v3 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
@ 2024-11-15 13:03 ` Werner Sembach
  2024-11-15 16:40   ` Uwe Kleine-König
  2 siblings, 1 reply; 6+ messages in thread
From: Werner Sembach @ 2024-11-15 13:03 UTC (permalink / raw)
  To: u.kleine-koenig, mcgrof, petr.pavlu, samitolvanen, da.gomez,
	linux-modules, linux-kernel, linux, vv, cs

Am 15.11.24 um 13:58 schrieb Werner Sembach:
> 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 ...



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing
  2024-11-15 13:03 ` [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
@ 2024-11-15 16:40   ` Uwe Kleine-König
  2024-11-15 17:27     ` Werner Sembach
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2024-11-15 16:40 UTC (permalink / raw)
  To: Werner Sembach
  Cc: mcgrof, petr.pavlu, samitolvanen, da.gomez, linux-modules,
	linux-kernel, linux, vv, cs

[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]

Hello Werner,

On Fri, Nov 15, 2024 at 02:03:27PM +0100, Werner Sembach wrote:
> Am 15.11.24 um 13:58 schrieb Werner Sembach:
> > 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing
  2024-11-15 16:40   ` Uwe Kleine-König
@ 2024-11-15 17:27     ` Werner Sembach
  0 siblings, 0 replies; 6+ messages in thread
From: Werner Sembach @ 2024-11-15 17:27 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: mcgrof, petr.pavlu, samitolvanen, da.gomez, linux-modules,
	linux-kernel, linux, vv, cs

Hello,

Am 15.11.24 um 17:40 schrieb Uwe Kleine-König:
> Hello Werner,
>
> On Fri, Nov 15, 2024 at 02:03:27PM +0100, Werner Sembach wrote:
>> Am 15.11.24 um 13:58 schrieb Werner Sembach:
>>> 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.
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.
>
> 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.
>
> 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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-15 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 12:58 [PATCH v2 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
2024-11-15 12:58 ` [PATCH v3 1/2] module: Put known GPL offenders in an array Werner Sembach
2024-11-15 12:58 ` [PATCH v3 2/2] module: Block some modules by TUXEDO from accessing GPL symbols Werner Sembach
2024-11-15 13:03 ` [PATCH v3 0/2] module: Block some modules by TUXEDO from accessing Werner Sembach
2024-11-15 16:40   ` Uwe Kleine-König
2024-11-15 17:27     ` 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®