grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question re correctness of module license check


From: George Barrett
Subject: Question re correctness of module license check
Date: Sat, 04 Feb 2023 02:57:53 +1100

The module loader contains the following check:[1]

    /* Me, Vladimir Serbinenko, hereby I add this module check as per new
       GNU module policy. Note that this license check is informative only.
       Modules have to be licensed under GPLv3 or GPLv3+ (optionally
       multi-licensed under other licences as well) independently of the
       presence of this check and solely by linking (module loading in GRUB
       constitutes linking) and GRUB core being licensed under GPLv3+.
       Be sure to understand your license obligations.
    */
    static grub_err_t
    grub_dl_check_license (grub_dl_t mod, Elf_Ehdr *e)
    {
      Elf_Shdr *s = grub_dl_find_section (e, ".module_license");

      if (s == NULL)
        return grub_error (GRUB_ERR_BAD_MODULE,
                       "no license section in module %.63s", mod->name);

      if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
          || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
          || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
        return GRUB_ERR_NONE;

      return grub_error (GRUB_ERR_BAD_MODULE,
                     "incompatible license in module %.63s: %.63s", mod->name,
                     (char *) e + s->sh_offset);
    }

IANAL, but my understanding is that GRUB's license is complied with when
the loaded module is covered by a license that can be "subsumed"[2] by
the GPLv3 (or that can subsume the GPLv3, like a future GPLv4).  As
noted by [2], this includes Apache, MPL, etc.

As for the "GNU module policy", I could not find what this references:
 - The commit introducing the check doesn't mention what this policy is,
   where it comes from or where it was discussed.[3]
 - Neither does the mailing list thread in which the GRUB change was
   discussed.[4]
 - Looking up variations of "GNU module licensing policy" didn't reveal
   any clues either (only [5], which seems to further support the notion
   that licenses other than GPL might be acceptable).

>From the above, it is my conclusion that
 (a) usage of other compatible licenses for modules is legally
     permissible, contrary to the suggestion of the quoted comment; and
 (b) any such GNU policy mandating modules be GPL licensed is either
     disused to the point of obscurity or never truly existed in the
     first place (i.e. was the result of some ad-hoc process or
     misunderstanding, etc, rather than some officially promulgated and
     promoted policy.  I don't intend to insinuate deliberate
     untruthfulness).

Is this fair/accurate?  If so, can the check be relaxed to accept
compatible licenses and the comment clarified?

[1]: 
https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/dl.c?id=65bc45963014773e2062ccc63ff34a089d2e352e#n451
[2]: https://www.gnu.org/licenses/license-compatibility.html#combining
[3]: 
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e745cf0ca64f94fa072d777cde8186aca2b78c1f
[4]: https://lists.gnu.org/archive/html/grub-devel/2011-04/msg00089.html
[5]: https://www.gnu.org/licenses/gpl-faq.en.html#GPLModuleLicense



reply via email to

[Prev in Thread] Current Thread [Next in Thread]