Files
ack-tegra/include/linux/module_symbol.h
T
Siddharth Nayyar e0ea42b26f ANDROID: modpost: add symbol import protection flag to kflagstab
When the unused exports whitelist is provided, the symbol protection bit
is set for symbols not present in the unused exports whitelist.

The flag will be used in the following commit to prevent unsigned
modules from the using symbols other than those explicitly declared by
the such modules ahead of time.

Bug: 519119852
Change-Id: Ibddd628a8b1463397cc95d3d8f556b9bc82bf623
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
2026-06-04 01:46:10 -07:00

22 lines
526 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _LINUX_MODULE_SYMBOL_H
#define _LINUX_MODULE_SYMBOL_H
/* Kernel symbol flags bitset. */
enum ksym_flags {
KSYM_FLAG_GPL_ONLY = 1 << 0,
KSYM_FLAG_PROTECTED = 1 << 1,
};
/* This ignores the intensely annoying "mapping symbols" found in ELF files. */
static inline bool is_mapping_symbol(const char *str)
{
if (str[0] == '.' && str[1] == 'L')
return true;
if (str[0] == 'L' && str[1] == '0')
return true;
return str[0] == '$';
}
#endif /* _LINUX_MODULE_SYMBOL_H */