linux-stable/arch
Huacai Chen be100a8460 LoongArch: Mark 3 symbol exports as non-GPL
commit dce5ea1d0f 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
497d2adcbf ("[MIPS] Export empty_zero_page for sake of the ext4
module."). The IA64 export was similar: commit a7d57ecf42 ("[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>
2023-04-26 14:28:38 +02:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:50:31 +01:00
arc
arm ARM: dts: rockchip: fix a typo error for rk3288 spdif node 2023-04-26 14:28:30 +02:00
arm64 arm64: dts: imx8mp-verdin: correct off-on-delay 2023-04-26 14:28:31 +02:00
csky
hexagon
ia64
loongarch LoongArch: Mark 3 symbol exports as non-GPL 2023-04-26 14:28:38 +02:00
m68k m68k: Only force 030 bus error if PC not in exception table 2023-03-30 12:49:17 +02:00
microblaze
mips mips: bmips: BCM6358: disable RAC flush for TP1 2023-04-06 12:10:42 +02:00
nios2
openrisc
parisc
powerpc powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-20 12:35:14 +02:00
riscv riscv: add icache flush for nommu sigreturn trampoline 2023-04-20 12:35:12 +02:00
s390 s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling 2023-04-26 14:28:36 +02:00
sh sh: sanitize the flags on sigreturn 2023-03-30 12:49:19 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-10 09:33:27 +01:00
um UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:50:32 +01:00
x86 x86/rtc: Remove __init for runtime functions 2023-04-20 12:35:14 +02:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-06 12:10:54 +02:00
.gitignore
Kconfig