|
|
Log in / Subscribe / Register

Another push for sched_ext

Another push for sched_ext

Posted May 10, 2024 14:42 UTC (Fri) by Manifault (guest, #155796)
In reply to: Another push for sched_ext by Wol
Parent article: Another push for sched_ext

I'm not a lawyer, but that seems like a... rather naive interpretation of the text. The GPL does not guarantee your right to always have your program run _successfully_ in any environment. It's guaranteeing your right to _use_ your program as much as you want without being sued by some entity claiming that it's their intellectual property. The verifier rejecting an unsafe (or improperly licensed) BPF program is no different than if the main kernel returns an error code for some system call that has invalid inputs. If the verifier considers a BPF program unsafe or unsuitable to load it, it's under no legal obligation to load it. If your GPLv2 program is broken, you can still use it, but the operating system is (obviously) under no obligation to run it for you.

Also, my comment said that the verifier will reject sched_ext programs that are _not_ licensed with GPLv2. If it rejects programs with a different license, they wouldn't get any protections from GPLv2 regardless.


to post comments

Another push for sched_ext

Posted May 10, 2024 21:10 UTC (Fri) by NYKevin (subscriber, #129325) [Link] (3 responses)

I think the real questions are:

1. Is it legal to make a modified version of the BPF verifier which does not reject non-GPL-licensed programs? It might violate 17 USC 1201 (and similar laws in other countries). Version 3 of the GPL explicitly repudiates that provision of copyright law, but the kernel is licensed under GPLv2. OTOH, the GPL is much more permissive than a "typical" (proprietary) copyright license, so I don't know what courts would say in that situation. Certainly the spirit of the license is that you can change whatever you want, so long as you distribute those changes (if at all) under the GPL. I also believe this is the intent of most if not all of the people who have actually contributed source code to the kernel.
2. Is it legal to make a BPF sched_ext program that is not GPL? In most countries, this will turn on some kind of substantial similarity analysis. In the US, some courts have adopted a software-specific test called the "abstraction-filtration-comparison test," which complicates things, but the short version is that there must be portions of the allegedly infringing work (the BPF program) which are both eligible for copyright protection and also present in the original work (the kernel), and those portions must be substantial enough to infer that some kind of "copying" happened. This is not necessarily limited to literal copying of source code, but it can't be something as abstract as an entire algorithm, either (nobody owns quicksort, for example). The AFC test is basically just a more methodical and specific way of doing that analysis for software. Probably other countries won't do the exact same analysis, but it is hard to imagine them doing something wildly different.

Another push for sched_ext

Posted May 11, 2024 1:07 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (1 responses)

> Is it legal to make a modified version of the BPF verifier which does not reject non-GPL-licensed programs?

This feels more like a DMCA kind of thing to me.

Another push for sched_ext

Posted May 11, 2024 8:39 UTC (Sat) by Wol (subscriber, #4433) [Link]

There's another point here too.

Are BPF programs distributed as source? I thought the kernel ran them through a jit compiler?

Because we have the problem there that the GPL is not a particularly suitable licence for stuff distributed as source, about the only Freedom you're missing is the ability to distribute - the mere fact it's source gives you everything else.

Oh - and by the way, does it REALLY refuse to run anything that's not GPL2? What about BSD? MIT? MPL2? PD etc?

Cheers,
Wol

Another push for sched_ext

Posted May 11, 2024 6:54 UTC (Sat) by mb (subscriber, #50428) [Link]

>Is it legal to make a modified version of the BPF verifier which does not reject non-GPL-licensed programs?

Yes, of course. That does not change the licensing situation at all.

You can:
- Remove this check from the verifier.
- Use the modified verifier.
- Distribute the resulting verifier code.
- Write a non-GPL BPF program and use it locally without distributing.

It may be a license violation (courts have to decide), if:
- You distribute your non-GPL BPF program.

It might also be totally fine to distribute the non-GPL BPF program along with the modified verifier, if a court rules that the BPF program is not a derived work.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds