Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Kernel module for testing static keys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright 2015 Akamai Technologies Inc. All Rights Reserved
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *      Jason Baron       <jbaron@akamai.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/jump_label.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) /* old keys */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) struct static_key old_true_key	= STATIC_KEY_INIT_TRUE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) struct static_key old_false_key	= STATIC_KEY_INIT_FALSE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) /* new api */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) DEFINE_STATIC_KEY_TRUE(true_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) DEFINE_STATIC_KEY_FALSE(false_key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) /* external */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) extern struct static_key base_old_true_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) extern struct static_key base_inv_old_true_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) extern struct static_key base_old_false_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) extern struct static_key base_inv_old_false_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) /* new api */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) extern struct static_key_true base_true_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) extern struct static_key_true base_inv_true_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) extern struct static_key_false base_false_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) extern struct static_key_false base_inv_false_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) struct test_key {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	bool			init_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	struct static_key	*key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	bool			(*test_key)(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #define test_key_func(key, branch)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) static bool key ## _ ## branch(void)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) {					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	return branch(&key);		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) static void invert_key(struct static_key *key)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	if (static_key_enabled(key))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		static_key_disable(key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		static_key_enable(key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) static void invert_keys(struct test_key *keys, int size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	struct static_key *previous = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	for (i = 0; i < size; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		if (previous != keys[i].key) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 			invert_key(keys[i].key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 			previous = keys[i].key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) static int verify_keys(struct test_key *keys, int size, bool invert)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	bool ret, init;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	for (i = 0; i < size; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		ret = static_key_enabled(keys[i].key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		init = keys[i].init_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		if (ret != (invert ? !init : init))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 			return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		ret = keys[i].test_key();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		if (static_key_enabled(keys[i].key)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			if (!ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 				return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 			if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 				return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) test_key_func(old_true_key, static_key_true)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) test_key_func(old_false_key, static_key_false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) test_key_func(true_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) test_key_func(true_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) test_key_func(false_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) test_key_func(false_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) test_key_func(base_old_true_key, static_key_true)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) test_key_func(base_inv_old_true_key, static_key_true)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) test_key_func(base_old_false_key, static_key_false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) test_key_func(base_inv_old_false_key, static_key_false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) test_key_func(base_true_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) test_key_func(base_true_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) test_key_func(base_inv_true_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) test_key_func(base_inv_true_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) test_key_func(base_false_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) test_key_func(base_false_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) test_key_func(base_inv_false_key, static_branch_likely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) test_key_func(base_inv_false_key, static_branch_unlikely)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) static int __init test_static_key_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	int size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	struct test_key static_key_tests[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		/* internal keys - old keys */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 			.key		= &old_true_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 			.test_key	= &old_true_key_static_key_true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 			.key		= &old_false_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 			.test_key	= &old_false_key_static_key_false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		/* internal keys - new keys */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 			.key		= &true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 			.test_key	= &true_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 			.key		= &true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 			.test_key	= &true_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 			.key		= &false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 			.test_key	= &false_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 			.key		= &false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 			.test_key	= &false_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		/* external keys - old keys */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 			.key		= &base_old_true_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 			.test_key	= &base_old_true_key_static_key_true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 			.key		= &base_inv_old_true_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 			.test_key	= &base_inv_old_true_key_static_key_true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 			.key		= &base_old_false_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 			.test_key	= &base_old_false_key_static_key_false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 			.key		= &base_inv_old_false_key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 			.test_key	= &base_inv_old_false_key_static_key_false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		/* external keys - new keys */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 			.key		= &base_true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 			.test_key	= &base_true_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			.key		= &base_true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 			.test_key	= &base_true_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 			.key		= &base_inv_true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 			.test_key	= &base_inv_true_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 			.key		= &base_inv_true_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 			.test_key	= &base_inv_true_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 			.key		= &base_false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 			.test_key	= &base_false_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 			.init_state	= false,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 			.key		= &base_false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 			.test_key	= &base_false_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 			.key		= &base_inv_false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 			.test_key	= &base_inv_false_key_static_branch_likely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 		{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 			.init_state	= true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 			.key		= &base_inv_false_key.key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 			.test_key	= &base_inv_false_key_static_branch_unlikely,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 		},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	size = ARRAY_SIZE(static_key_tests);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	ret = verify_keys(static_key_tests, size, false);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	invert_keys(static_key_tests, size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	ret = verify_keys(static_key_tests, size, true);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	invert_keys(static_key_tests, size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	ret = verify_keys(static_key_tests, size, false);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) static void __exit test_static_key_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) module_init(test_static_key_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) module_exit(test_static_key_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) MODULE_AUTHOR("Jason Baron <jbaron@akamai.com>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) MODULE_LICENSE("GPL");