]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Export mmu_feature_keys[] as non-GPL
authorKevin Hao <haokexin@gmail.com>
Tue, 29 Mar 2022 08:57:09 +0000 (16:57 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 May 2022 13:11:26 +0000 (23:11 +1000)
commita346a7c6bf5f9631da70ab61740633c50d8f8109
treeb64a51af9876f14829f6f76cbc7dff16e7ba15ef
parentf6eecf80261213fe8b56962e7b3ccb9a497a21aa
powerpc: Export mmu_feature_keys[] as non-GPL

When the mmu_feature_keys[] was introduced in the commit 26067bdfddd8
("powerpc: Add option to use jump label for mmu_has_feature()"),
it is unlikely that it would be used either directly or indirectly in
the out of tree modules. So we exported it as GPL only.

But with the evolution of the codes, especially the PPC_KUAP support, it
may be indirectly referenced by some primitive macro or inline functions
such as get_user() or __copy_from_user_inatomic(), this will make it
impossible to build many non GPL modules (such as ZFS) on ppc
architecture. Fix this by exposing the mmu_feature_keys[] to the non-GPL
modules too.

Fixes: d9c82e5f0e03 ("powerpc/64s/kuap: Use mmu_has_feature()")
Reported-by: Nathaniel Filardo <nwfilardo@gmail.com>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220329085709.4132729-1-haokexin@gmail.com
arch/powerpc/kernel/cputable.c