mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
module: remove EXPORT_SYMBOL_GPL_FUTURE
As far as I can tell this has never been used at all, and certainly not any time recently. Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jessica Yu <jeyu@kernel.org>
This commit is contained in:
parent
00cc2c1cd3
commit
f1c3d73e97
@ -61,8 +61,8 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
|
|||||||
"(__iommu_table|__apicdrivers|__smp_locks)(|_end)|"
|
"(__iommu_table|__apicdrivers|__smp_locks)(|_end)|"
|
||||||
"__(start|end)_pci_.*|"
|
"__(start|end)_pci_.*|"
|
||||||
"__(start|end)_builtin_fw|"
|
"__(start|end)_builtin_fw|"
|
||||||
"__(start|stop)___ksymtab(|_gpl|_unused|_unused_gpl|_gpl_future)|"
|
"__(start|stop)___ksymtab(|_gpl|_unused|_unused_gpl)|"
|
||||||
"__(start|stop)___kcrctab(|_gpl|_unused|_unused_gpl|_gpl_future)|"
|
"__(start|stop)___kcrctab(|_gpl|_unused|_unused_gpl)|"
|
||||||
"__(start|stop)___param|"
|
"__(start|stop)___param|"
|
||||||
"__(start|stop)___modver|"
|
"__(start|stop)___modver|"
|
||||||
"__(start|stop)___bug_table|"
|
"__(start|stop)___bug_table|"
|
||||||
|
@ -495,13 +495,6 @@
|
|||||||
__stop___ksymtab_unused_gpl = .; \
|
__stop___ksymtab_unused_gpl = .; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/* Kernel symbol table: GPL-future-only symbols */ \
|
|
||||||
__ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
|
|
||||||
__start___ksymtab_gpl_future = .; \
|
|
||||||
KEEP(*(SORT(___ksymtab_gpl_future+*))) \
|
|
||||||
__stop___ksymtab_gpl_future = .; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
/* Kernel symbol table: Normal symbols */ \
|
/* Kernel symbol table: Normal symbols */ \
|
||||||
__kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
|
__kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
|
||||||
__start___kcrctab = .; \
|
__start___kcrctab = .; \
|
||||||
@ -530,13 +523,6 @@
|
|||||||
__stop___kcrctab_unused_gpl = .; \
|
__stop___kcrctab_unused_gpl = .; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/* Kernel symbol table: GPL-future-only symbols */ \
|
|
||||||
__kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
|
|
||||||
__start___kcrctab_gpl_future = .; \
|
|
||||||
KEEP(*(SORT(___kcrctab_gpl_future+*))) \
|
|
||||||
__stop___kcrctab_gpl_future = .; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
/* Kernel symbol table: strings */ \
|
/* Kernel symbol table: strings */ \
|
||||||
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
|
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
|
||||||
*(__ksymtab_strings) \
|
*(__ksymtab_strings) \
|
||||||
|
@ -157,7 +157,6 @@ struct kernel_symbol {
|
|||||||
|
|
||||||
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
|
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
|
||||||
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
|
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
|
||||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym) _EXPORT_SYMBOL(sym, "_gpl_future")
|
|
||||||
#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", #ns)
|
#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", #ns)
|
||||||
#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "_gpl", #ns)
|
#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "_gpl", #ns)
|
||||||
|
|
||||||
|
@ -411,11 +411,6 @@ struct module {
|
|||||||
|
|
||||||
bool async_probe_requested;
|
bool async_probe_requested;
|
||||||
|
|
||||||
/* symbols that will be GPL-only in the near future. */
|
|
||||||
const struct kernel_symbol *gpl_future_syms;
|
|
||||||
const s32 *gpl_future_crcs;
|
|
||||||
unsigned int num_gpl_future_syms;
|
|
||||||
|
|
||||||
/* Exception table */
|
/* Exception table */
|
||||||
unsigned int num_exentries;
|
unsigned int num_exentries;
|
||||||
struct exception_table_entry *extable;
|
struct exception_table_entry *extable;
|
||||||
|
@ -408,11 +408,8 @@ extern const struct kernel_symbol __start___ksymtab[];
|
|||||||
extern const struct kernel_symbol __stop___ksymtab[];
|
extern const struct kernel_symbol __stop___ksymtab[];
|
||||||
extern const struct kernel_symbol __start___ksymtab_gpl[];
|
extern const struct kernel_symbol __start___ksymtab_gpl[];
|
||||||
extern const struct kernel_symbol __stop___ksymtab_gpl[];
|
extern const struct kernel_symbol __stop___ksymtab_gpl[];
|
||||||
extern const struct kernel_symbol __start___ksymtab_gpl_future[];
|
|
||||||
extern const struct kernel_symbol __stop___ksymtab_gpl_future[];
|
|
||||||
extern const s32 __start___kcrctab[];
|
extern const s32 __start___kcrctab[];
|
||||||
extern const s32 __start___kcrctab_gpl[];
|
extern const s32 __start___kcrctab_gpl[];
|
||||||
extern const s32 __start___kcrctab_gpl_future[];
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
extern const struct kernel_symbol __start___ksymtab_unused[];
|
extern const struct kernel_symbol __start___ksymtab_unused[];
|
||||||
extern const struct kernel_symbol __stop___ksymtab_unused[];
|
extern const struct kernel_symbol __stop___ksymtab_unused[];
|
||||||
@ -434,7 +431,6 @@ struct symsearch {
|
|||||||
enum mod_license {
|
enum mod_license {
|
||||||
NOT_GPL_ONLY,
|
NOT_GPL_ONLY,
|
||||||
GPL_ONLY,
|
GPL_ONLY,
|
||||||
WILL_BE_GPL_ONLY,
|
|
||||||
} license;
|
} license;
|
||||||
bool unused;
|
bool unused;
|
||||||
};
|
};
|
||||||
@ -458,15 +454,8 @@ static bool check_exported_symbol(const struct symsearch *syms,
|
|||||||
{
|
{
|
||||||
struct find_symbol_arg *fsa = data;
|
struct find_symbol_arg *fsa = data;
|
||||||
|
|
||||||
if (!fsa->gplok) {
|
if (!fsa->gplok && syms->license == GPL_ONLY)
|
||||||
if (syms->license == GPL_ONLY)
|
return false;
|
||||||
return false;
|
|
||||||
if (syms->license == WILL_BE_GPL_ONLY && fsa->warn) {
|
|
||||||
pr_warn("Symbol %s is being used by a non-GPL module, "
|
|
||||||
"which will not be allowed in the future\n",
|
|
||||||
fsa->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
if (syms->unused && fsa->warn) {
|
if (syms->unused && fsa->warn) {
|
||||||
@ -550,9 +539,6 @@ static bool find_symbol(struct find_symbol_arg *fsa)
|
|||||||
{ __start___ksymtab_gpl, __stop___ksymtab_gpl,
|
{ __start___ksymtab_gpl, __stop___ksymtab_gpl,
|
||||||
__start___kcrctab_gpl,
|
__start___kcrctab_gpl,
|
||||||
GPL_ONLY, false },
|
GPL_ONLY, false },
|
||||||
{ __start___ksymtab_gpl_future, __stop___ksymtab_gpl_future,
|
|
||||||
__start___kcrctab_gpl_future,
|
|
||||||
WILL_BE_GPL_ONLY, false },
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
{ __start___ksymtab_unused, __stop___ksymtab_unused,
|
{ __start___ksymtab_unused, __stop___ksymtab_unused,
|
||||||
__start___kcrctab_unused,
|
__start___kcrctab_unused,
|
||||||
@ -579,10 +565,6 @@ static bool find_symbol(struct find_symbol_arg *fsa)
|
|||||||
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
|
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
|
||||||
mod->gpl_crcs,
|
mod->gpl_crcs,
|
||||||
GPL_ONLY, false },
|
GPL_ONLY, false },
|
||||||
{ mod->gpl_future_syms,
|
|
||||||
mod->gpl_future_syms + mod->num_gpl_future_syms,
|
|
||||||
mod->gpl_future_crcs,
|
|
||||||
WILL_BE_GPL_ONLY, false },
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
{ mod->unused_syms,
|
{ mod->unused_syms,
|
||||||
mod->unused_syms + mod->num_unused_syms,
|
mod->unused_syms + mod->num_unused_syms,
|
||||||
@ -2292,7 +2274,6 @@ static int verify_exported_symbols(struct module *mod)
|
|||||||
} arr[] = {
|
} arr[] = {
|
||||||
{ mod->syms, mod->num_syms },
|
{ mod->syms, mod->num_syms },
|
||||||
{ mod->gpl_syms, mod->num_gpl_syms },
|
{ mod->gpl_syms, mod->num_gpl_syms },
|
||||||
{ mod->gpl_future_syms, mod->num_gpl_future_syms },
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
{ mod->unused_syms, mod->num_unused_syms },
|
{ mod->unused_syms, mod->num_unused_syms },
|
||||||
{ mod->unused_gpl_syms, mod->num_unused_gpl_syms },
|
{ mod->unused_gpl_syms, mod->num_unused_gpl_syms },
|
||||||
@ -3308,11 +3289,6 @@ static int find_module_sections(struct module *mod, struct load_info *info)
|
|||||||
sizeof(*mod->gpl_syms),
|
sizeof(*mod->gpl_syms),
|
||||||
&mod->num_gpl_syms);
|
&mod->num_gpl_syms);
|
||||||
mod->gpl_crcs = section_addr(info, "__kcrctab_gpl");
|
mod->gpl_crcs = section_addr(info, "__kcrctab_gpl");
|
||||||
mod->gpl_future_syms = section_objs(info,
|
|
||||||
"__ksymtab_gpl_future",
|
|
||||||
sizeof(*mod->gpl_future_syms),
|
|
||||||
&mod->num_gpl_future_syms);
|
|
||||||
mod->gpl_future_crcs = section_addr(info, "__kcrctab_gpl_future");
|
|
||||||
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
mod->unused_syms = section_objs(info, "__ksymtab_unused",
|
mod->unused_syms = section_objs(info, "__ksymtab_unused",
|
||||||
@ -3506,7 +3482,6 @@ static int check_module_license_and_versions(struct module *mod)
|
|||||||
#ifdef CONFIG_MODVERSIONS
|
#ifdef CONFIG_MODVERSIONS
|
||||||
if ((mod->num_syms && !mod->crcs)
|
if ((mod->num_syms && !mod->crcs)
|
||||||
|| (mod->num_gpl_syms && !mod->gpl_crcs)
|
|| (mod->num_gpl_syms && !mod->gpl_crcs)
|
||||||
|| (mod->num_gpl_future_syms && !mod->gpl_future_crcs)
|
|
||||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||||
|| (mod->num_unused_syms && !mod->unused_crcs)
|
|| (mod->num_unused_syms && !mod->unused_crcs)
|
||||||
|| (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs)
|
|| (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs)
|
||||||
|
@ -44,7 +44,7 @@ static bool error_occurred;
|
|||||||
|
|
||||||
enum export {
|
enum export {
|
||||||
export_plain, export_unused, export_gpl,
|
export_plain, export_unused, export_gpl,
|
||||||
export_unused_gpl, export_gpl_future, export_unknown
|
export_unused_gpl, export_unknown
|
||||||
};
|
};
|
||||||
|
|
||||||
/* In kernel, this size is defined in linux/module.h;
|
/* In kernel, this size is defined in linux/module.h;
|
||||||
@ -304,7 +304,6 @@ static const struct {
|
|||||||
{ .str = "EXPORT_UNUSED_SYMBOL", .export = export_unused },
|
{ .str = "EXPORT_UNUSED_SYMBOL", .export = export_unused },
|
||||||
{ .str = "EXPORT_SYMBOL_GPL", .export = export_gpl },
|
{ .str = "EXPORT_SYMBOL_GPL", .export = export_gpl },
|
||||||
{ .str = "EXPORT_UNUSED_SYMBOL_GPL", .export = export_unused_gpl },
|
{ .str = "EXPORT_UNUSED_SYMBOL_GPL", .export = export_unused_gpl },
|
||||||
{ .str = "EXPORT_SYMBOL_GPL_FUTURE", .export = export_gpl_future },
|
|
||||||
{ .str = "(unknown)", .export = export_unknown },
|
{ .str = "(unknown)", .export = export_unknown },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -369,8 +368,6 @@ static enum export export_from_secname(struct elf_info *elf, unsigned int sec)
|
|||||||
return export_gpl;
|
return export_gpl;
|
||||||
else if (strstarts(secname, "___ksymtab_unused_gpl+"))
|
else if (strstarts(secname, "___ksymtab_unused_gpl+"))
|
||||||
return export_unused_gpl;
|
return export_unused_gpl;
|
||||||
else if (strstarts(secname, "___ksymtab_gpl_future+"))
|
|
||||||
return export_gpl_future;
|
|
||||||
else
|
else
|
||||||
return export_unknown;
|
return export_unknown;
|
||||||
}
|
}
|
||||||
@ -385,8 +382,6 @@ static enum export export_from_sec(struct elf_info *elf, unsigned int sec)
|
|||||||
return export_gpl;
|
return export_gpl;
|
||||||
else if (sec == elf->export_unused_gpl_sec)
|
else if (sec == elf->export_unused_gpl_sec)
|
||||||
return export_unused_gpl;
|
return export_unused_gpl;
|
||||||
else if (sec == elf->export_gpl_future_sec)
|
|
||||||
return export_gpl_future;
|
|
||||||
else
|
else
|
||||||
return export_unknown;
|
return export_unknown;
|
||||||
}
|
}
|
||||||
@ -596,8 +591,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
|
|||||||
info->export_gpl_sec = i;
|
info->export_gpl_sec = i;
|
||||||
else if (strcmp(secname, "__ksymtab_unused_gpl") == 0)
|
else if (strcmp(secname, "__ksymtab_unused_gpl") == 0)
|
||||||
info->export_unused_gpl_sec = i;
|
info->export_unused_gpl_sec = i;
|
||||||
else if (strcmp(secname, "__ksymtab_gpl_future") == 0)
|
|
||||||
info->export_gpl_future_sec = i;
|
|
||||||
|
|
||||||
if (sechdrs[i].sh_type == SHT_SYMTAB) {
|
if (sechdrs[i].sh_type == SHT_SYMTAB) {
|
||||||
unsigned int sh_link_idx;
|
unsigned int sh_link_idx;
|
||||||
@ -2152,10 +2145,6 @@ static void check_for_gpl_usage(enum export exp, const char *m, const char *s)
|
|||||||
error("GPL-incompatible module %s.ko uses GPL-only symbol marked UNUSED '%s'\n",
|
error("GPL-incompatible module %s.ko uses GPL-only symbol marked UNUSED '%s'\n",
|
||||||
m, s);
|
m, s);
|
||||||
break;
|
break;
|
||||||
case export_gpl_future:
|
|
||||||
warn("GPL-incompatible module %s.ko uses future GPL-only symbol '%s'\n",
|
|
||||||
m, s);
|
|
||||||
break;
|
|
||||||
case export_plain:
|
case export_plain:
|
||||||
case export_unused:
|
case export_unused:
|
||||||
case export_unknown:
|
case export_unknown:
|
||||||
|
@ -142,7 +142,6 @@ struct elf_info {
|
|||||||
Elf_Section export_unused_sec;
|
Elf_Section export_unused_sec;
|
||||||
Elf_Section export_gpl_sec;
|
Elf_Section export_gpl_sec;
|
||||||
Elf_Section export_unused_gpl_sec;
|
Elf_Section export_unused_gpl_sec;
|
||||||
Elf_Section export_gpl_future_sec;
|
|
||||||
char *strtab;
|
char *strtab;
|
||||||
char *modinfo;
|
char *modinfo;
|
||||||
unsigned int modinfo_len;
|
unsigned int modinfo_len;
|
||||||
|
@ -13,12 +13,10 @@ SECTIONS {
|
|||||||
__ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }
|
__ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }
|
||||||
__ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }
|
__ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }
|
||||||
__ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) }
|
__ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) }
|
||||||
__ksymtab_gpl_future 0 : { *(SORT(___ksymtab_gpl_future+*)) }
|
|
||||||
__kcrctab 0 : { *(SORT(___kcrctab+*)) }
|
__kcrctab 0 : { *(SORT(___kcrctab+*)) }
|
||||||
__kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) }
|
__kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) }
|
||||||
__kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) }
|
__kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) }
|
||||||
__kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }
|
__kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }
|
||||||
__kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }
|
|
||||||
|
|
||||||
.init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }
|
.init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#define EXPORT_SYMBOL(sym)
|
#define EXPORT_SYMBOL(sym)
|
||||||
#define EXPORT_SYMBOL_GPL(sym)
|
#define EXPORT_SYMBOL_GPL(sym)
|
||||||
#define EXPORT_SYMBOL_GPL_FUTURE(sym)
|
|
||||||
#define EXPORT_UNUSED_SYMBOL(sym)
|
#define EXPORT_UNUSED_SYMBOL(sym)
|
||||||
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
#define EXPORT_UNUSED_SYMBOL_GPL(sym)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user