#include <linux/memory.h>
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/sort.h>
#include <linux/err.h>
#include <linux/static_key.h>
#include <linux/jump_label_ratelimit.h>
#include <linux/bug.h>
#include <linux/cpu.h>
#include <asm/sections.h>
static DEFINE_MUTEX(jump_label_mutex);
void jump_label_lock(void)
{ … }
void jump_label_unlock(void)
{ … }
static int jump_label_cmp(const void *a, const void *b)
{ … }
static void jump_label_swap(void *a, void *b, int size)
{ … }
static void
jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
{ … }
static void jump_label_update(struct static_key *key);
int static_key_count(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
bool static_key_fast_inc_not_disabled(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
bool static_key_slow_inc_cpuslocked(struct static_key *key)
{ … }
bool static_key_slow_inc(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_enable_cpuslocked(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_enable(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_disable_cpuslocked(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_disable(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool static_key_slow_try_dec(struct static_key *key)
{ … }
static void __static_key_slow_dec_cpuslocked(struct static_key *key)
{ … }
static void __static_key_slow_dec(struct static_key *key)
{ … }
void jump_label_update_timeout(struct work_struct *work)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_slow_dec(struct static_key *key)
{ … }
EXPORT_SYMBOL_GPL(…);
void static_key_slow_dec_cpuslocked(struct static_key *key)
{ … }
void __static_key_slow_dec_deferred(struct static_key *key,
struct delayed_work *work,
unsigned long timeout)
{ … }
EXPORT_SYMBOL_GPL(…);
void __static_key_deferred_flush(void *key, struct delayed_work *work)
{ … }
EXPORT_SYMBOL_GPL(…);
void jump_label_rate_limit(struct static_key_deferred *key,
unsigned long rl)
{ … }
EXPORT_SYMBOL_GPL(…);
static int addr_conflict(struct jump_entry *entry, void *start, void *end)
{ … }
static int __jump_label_text_reserved(struct jump_entry *iter_start,
struct jump_entry *iter_stop, void *start, void *end, bool init)
{ … }
#ifndef arch_jump_label_transform_static
static void arch_jump_label_transform_static(struct jump_entry *entry,
enum jump_label_type type)
{ … }
#endif
static inline struct jump_entry *static_key_entries(struct static_key *key)
{ … }
static inline bool static_key_type(struct static_key *key)
{ … }
static inline bool static_key_linked(struct static_key *key)
{ … }
static inline void static_key_clear_linked(struct static_key *key)
{ … }
static inline void static_key_set_linked(struct static_key *key)
{ … }
static void static_key_set_entries(struct static_key *key,
struct jump_entry *entries)
{ … }
static enum jump_label_type jump_label_type(struct jump_entry *entry)
{ … }
static bool jump_label_can_update(struct jump_entry *entry, bool init)
{ … }
#ifndef HAVE_JUMP_LABEL_BATCH
static void __jump_label_update(struct static_key *key,
struct jump_entry *entry,
struct jump_entry *stop,
bool init)
{
for (; (entry < stop) && (jump_entry_key(entry) == key); entry++) {
if (jump_label_can_update(entry, init))
arch_jump_label_transform(entry, jump_label_type(entry));
}
}
#else
static void __jump_label_update(struct static_key *key,
struct jump_entry *entry,
struct jump_entry *stop,
bool init)
{ … }
#endif
void __init jump_label_init(void)
{ … }
static inline bool static_key_sealed(struct static_key *key)
{ … }
static inline void static_key_seal(struct static_key *key)
{ … }
void jump_label_init_ro(void)
{ … }
#ifdef CONFIG_MODULES
enum jump_label_type jump_label_init_type(struct jump_entry *entry)
{ … }
struct static_key_mod { … };
static inline struct static_key_mod *static_key_mod(struct static_key *key)
{ … }
static void static_key_set_mod(struct static_key *key,
struct static_key_mod *mod)
{ … }
static int __jump_label_mod_text_reserved(void *start, void *end)
{ … }
static void __jump_label_mod_update(struct static_key *key)
{ … }
static int jump_label_add_module(struct module *mod)
{ … }
static void jump_label_del_module(struct module *mod)
{ … }
static int
jump_label_module_notify(struct notifier_block *self, unsigned long val,
void *data)
{ … }
static struct notifier_block jump_label_module_nb = …;
static __init int jump_label_init_module(void)
{ … }
early_initcall(jump_label_init_module);
#endif
int jump_label_text_reserved(void *start, void *end)
{ … }
static void jump_label_update(struct static_key *key)
{ … }
#ifdef CONFIG_STATIC_KEYS_SELFTEST
static DEFINE_STATIC_KEY_TRUE(sk_true);
static DEFINE_STATIC_KEY_FALSE(sk_false);
static __init int jump_label_test(void)
{ … }
early_initcall(jump_label_test);
#endif