]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
LoongArch: Mark 3 symbol exports as non-GPL
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 18 Apr 2023 11:38:58 +0000 (19:38 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Jun 2023 12:57:55 +0000 (14:57 +0200)
commit69b7863fe5905511ecb3b0879e9e4b25bf2065aa
treeae34704d2d8a762b9944ed3d973443bb89fcc2bb
parentdb1e2287a9ab6a374040ad45aa37dc866acb3559
LoongArch: Mark 3 symbol exports as non-GPL

BugLink: https://bugs.launchpad.net/bugs/2023929
commit dce5ea1d0f45fa612f5760b88614a3f32bc75e3f upstream.

vm_map_base, empty_zero_page and invalid_pmd_table could be accessed
widely by some out-of-tree non-GPL but important file systems or drivers
(e.g. OpenZFS). Let's use EXPORT_SYMBOL() instead of EXPORT_SYMBOL_GPL()
to export them, so as to avoid build errors.

1, Details about vm_map_base:

This is a LoongArch-specific symbol and may be referenced through macros
PCI_IOBASE, VMALLOC_START and VMALLOC_END.

2, Details about empty_zero_page:

As it stands today, only 3 architectures export empty_zero_page as a GPL
symbol: IA64, LoongArch and MIPS. LoongArch gets the GPL export by
inheriting from MIPS, and the MIPS export was first introduced in commit
497d2adcbf50b ("[MIPS] Export empty_zero_page for sake of the ext4
module."). The IA64 export was similar: commit a7d57ecf4216e ("[IA64]
Export three symbols for module use") did so for kvm.

In both IA64 and MIPS, the export of empty_zero_page was done for
satisfying some in-kernel component built as module (kvm and ext4
respectively), and given its reasonably low-level nature, GPL is a
reasonable choice. But looking at the bigger picture it is evident most
other architectures do not regard it as GPL, so in effect the symbol
probably should not be treated as such, in favor of consistency.

3, Details about invalid_pmd_table:

Keep consistency with invalid_pte_table and make it be possible by some
modules.

Cc: stable@vger.kernel.org
Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/loongarch/kernel/cpu-probe.c
arch/loongarch/mm/init.c