lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5475c3ab-a53c-8728-98c5-98fd948ff556@szanni.org>
Date:   Sat, 27 Nov 2021 19:07:49 -0500
From:   Angelo Haller <lkml@...nni.org>
To:     linux-kernel@...r.kernel.org
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Will Deacon <will@...nel.org>, linux-rt-users@...r.kernel.org
Subject: sched: some non-GPL symbols becoming GPL-only with CONFIG_PREEMPT_RT
 enabled

Greetings. I hope I picked the right mailing list, as this issue might 
be one that affects various subsystems and components:

When compiling kernel 5.15 (and 5.16-rc2) with `CONFIG_PREEMPT_RT` 
enabled, some of the symbols being exported as `EXPORT_SYMBOL` suddenly 
become `EXPORT_SYMBOL_GPL` through transitive effects.

In particular the symbols `migrate_enable` and `migrate_disable` are 
currently marked as `EXPORT_SYMBOL_GPL` - yet are called from multiple 
functions that are marked as `EXPORT_SYMBOL`.

Here an (incomplete?) listing of call sites I came across:

kernel/locking/spinlock_rt.c - rt_spin_unlock()
kernel/locking/spinlock_rt.c - rt_read_unlock()
kernel/locking/spinlock_rt.c - rt_write_unlock()
mm/highmem.c - kunmap_local_indexed()

The issue I'm facing in particular is kmap_atomic() calling 
`migrate_disable` and therefore suddenly becoming GPL-only. This breaks 
the out-of-tree CDDL licensed module ZFS and has been reported before 
already [0]. The conversation seemingly going nowhere - or patches at 
least not being applied upstream. Downstream issue for reference [1].

As the original implementation of `migrate_enable` and `migrate_disable` 
is apparently by Peter Zijlstra [2]. Peter would you be willing to 
re-license both symbols `migrate_enable` and `migrate_disable` as 
`EXPORT_SYMBOL`?

The bigger issue I'm seeing though is that there is currently no 
automated test to uncover exported symbols changing their license 
depending on build configuration? I am not intimately familiar with the 
API guarantees the kernel gives, but this seems like a violation. There 
might be other symbols with similar licensing problems.

I can open a bugzilla ticket too - if that is preferred.

Angelo


[0] 
https://lore.kernel.org/linux-rt-users/20201208212841.694b3022@orivej.orivej.org/T/
[1] https://github.com/openzfs/zfs/issues/11097
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/diff/patches/0009-sched-Add-migrate_disable.patch?h=v5.9-rc8-rt14-patches&id=9a89bfdb3bc77aecdd0ff8cc69b595541c7b50c4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ