Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.15 15 lines 396 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/bpf.h> 3#include <bpf/bpf_helpers.h> 4#include <bpf/bpf_endian.h> 5 6volatile __u64 test_get_constant = 0; 7SEC("freplace/get_constant") 8int security_new_get_constant(long val) 9{ 10 if (val != 123) 11 return 0; 12 test_get_constant = 1; 13 return test_get_constant; /* original get_constant() returns val - 122 */ 14} 15char _license[] SEC("license") = "GPL";